Automatic tuning method and device for control parameters of PI controller for permanent magnet synchronous motor

By using experimental methods to automatically adjust the control parameters of the permanent magnet synchronous motor PI controller based on the feedback results of the motor's dynamic performance, the problems of complex adjustment process and low accuracy in the existing technology are solved, and efficient and accurate parameter adjustment is achieved.

CN117458922BActive Publication Date: 2026-07-17AUBO (BEIJING) ROBOTICS TECH CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
AUBO (BEIJING) ROBOTICS TECH CO LTD
Filing Date
2022-07-18
Publication Date
2026-07-17

AI Technical Summary

Technical Problem

In existing technologies, the control parameter tuning process of permanent magnet synchronous motor PI controllers is complex and has low accuracy, with both model-based and experimental methods having their shortcomings.

Method used

The control parameters of the PI controller are automatically tuned based on the feedback results of the motor's dynamic performance using an experimental method. The overshoot is calculated by collecting phase current and the proportional and integral gains are adjusted. The parameters are then precisely adjusted using the binary division method.

Benefits of technology

It enables parameter tuning without human intervention or model building, significantly improving the accuracy of parameter tuning and simplifying the tuning process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117458922B_ABST
    Figure CN117458922B_ABST
Patent Text Reader

Abstract

This invention provides an automatic tuning method and apparatus for the control parameters of a PI controller for a permanent magnet synchronous motor. The method includes: given initial control parameters for the PI controller, controlling the permanent magnet synchronous motor to operate, wherein the integral gain is zero and the proportional gain is a first proportional gain; calculating a first overshoot of the control system of the permanent magnet synchronous motor based on the phase current of the permanent magnet synchronous motor; determining whether the first overshoot is equal to zero; if so, continuously increasing the proportional gain of the PI controller until the overshoot of the control system is greater than zero, and obtaining the corresponding second proportional gain of the PI controller; increasing the integral gain of the PI controller to the first integral gain, and obtaining the corresponding second overshoot; determining whether the difference between the second overshoot and a preset overshoot is less than zero; if so, continuously increasing the integral gain of the PI controller until the difference is greater than zero, and obtaining the second integral gain of the PI controller corresponding to the difference being greater than zero. Therefore, the tuning accuracy is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of motor control technology, specifically to an automatic tuning method for the control parameters of a permanent magnet synchronous motor PI controller and an apparatus for the automatic tuning method of the control parameters of a permanent magnet synchronous motor PI controller. Background Technology

[0002] In related technologies, model-based and experimental methods are generally used to tune the control parameters of PI controllers for permanent magnet synchronous motors. When using the model-based method, a model needs to be built, but the model often differs from the actual situation and therefore cannot adequately meet the desired controller performance requirements. When using the experimental method, parameters need to be manually adjusted continuously, making the tuning process complex and resulting in lower accuracy. Summary of the Invention

[0003] To address the aforementioned technical problems, this invention provides an automatic tuning method for the control parameters of a PI controller for a permanent magnet synchronous motor. This method employs an experimental approach to automatically tune the PI controller's control parameters based on feedback from the motor's dynamic performance, eliminating the need for manual intervention. The tuning process is simple and requires no modeling, thus significantly improving the accuracy of parameter tuning.

[0004] The technical solution adopted in this invention is as follows:

[0005] An automatic tuning method for the control parameters of a PI controller for a permanent magnet synchronous motor includes the following steps: Given initial control parameters for the PI controller, controlling the permanent magnet synchronous motor to operate, wherein the integral gain of the initial control parameters of the PI controller is zero and the proportional gain is a first proportional gain; during the operation of the permanent magnet synchronous motor, the phase current of the permanent magnet synchronous motor is collected, and a first overshoot of the control system of the permanent magnet synchronous motor is calculated based on the phase current; it is determined whether the first overshoot is equal to zero; if so, the proportional gain of the PI controller is continuously increased by a first preset multiple until the overshoot of the control system is greater than zero, and a second proportional gain of the PI controller corresponding to the overshoot of the control system being greater than zero is obtained; the integral gain of the PI controller is increased to the first integral gain, and the corresponding second overshoot of the control system is obtained; it is determined whether the difference between the second overshoot and the preset overshoot is less than zero; if so, the integral gain of the PI controller is continuously increased by a second preset multiple until the difference is greater than zero, and a second integral gain of the PI controller corresponding to the difference being greater than zero is obtained.

[0006] In one embodiment of the present invention, after obtaining the second proportional gain of the PI controller corresponding to the overshoot of the control system being greater than zero, the method further includes: gradually adjusting the proportional gain of the PI controller according to the first proportional gain and the second proportional gain using a binary search method to obtain the third proportional gain of the PI controller corresponding to the zero-crossing point of the overshoot of the control system.

[0007] In one embodiment of the present invention, after obtaining the second integral gain of the PI controller corresponding to the difference being greater than zero, the method further includes: gradually adjusting the integral gain of the PI controller according to the first integral gain and the second integral gain using a binary search method to obtain the third integral gain of the PI controller corresponding to the zero-crossing point of the difference.

[0008] An automatic tuning device for the control parameters of a PI controller for a permanent magnet synchronous motor (PMSM) includes: a control module for controlling the operation of the PMSM by providing initial control parameters to the PI controller, wherein the integral gain of the initial control parameters of the PI controller is zero and the proportional gain is a first proportional gain; a calculation module for acquiring the phase current of the PMSM during its operation and calculating a first overshoot of the control system based on the phase current; a first judgment module for judging whether the first overshoot is equal to zero; and a first acquisition module for continuously adjusting the control parameters according to a first preset multiple when the first overshoot is equal to zero. The system comprises: a first acquisition module, which increases the proportional gain of the PI controller until the overshoot of the control system is greater than zero, and acquires the second proportional gain of the PI controller corresponding to the overshoot of the control system being greater than zero; a second acquisition module, which increases the integral gain of the PI controller to a first integral gain and acquires the corresponding second overshoot of the control system; a second judgment module, which judges whether the difference between the second overshoot and a preset overshoot is less than zero; and a third acquisition module, which, when the difference is less than zero, continuously increases the integral gain of the PI controller by a second preset multiple until the difference is greater than zero, and acquires the second integral gain of the PI controller corresponding to the difference being greater than zero.

[0009] In one embodiment of the present invention, after the first acquisition module acquires the second proportional gain of the PI controller corresponding to the overshoot of the control system being greater than zero, it is further configured to: gradually adjust the proportional gain of the PI controller according to the first proportional gain and the second proportional gain using a binary search method to acquire the third proportional gain of the PI controller corresponding to the zero-crossing point of the overshoot of the control system.

[0010] In one embodiment of the present invention, after obtaining the second integral gain of the PI controller corresponding to the difference being greater than zero, the third acquisition module is further configured to: gradually adjust the integral gain of the PI controller according to the first integral gain and the second integral gain using a binary search method to obtain the third integral gain of the PI controller corresponding to the point where the difference crosses zero.

[0011] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the above-described method for automatically tuning the control parameters of a permanent magnet synchronous motor PI controller.

[0012] A non-transitory computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for automatically tuning the control parameters of a permanent magnet synchronous motor PI controller.

[0013] The beneficial effects of this invention are:

[0014] This invention uses an experimental method to automatically tune the control parameters of the PI controller based on the feedback results of the motor's dynamic performance. No manual intervention is required, the tuning process is simple, and no model needs to be built, thus greatly improving the accuracy of parameter tuning. Attached Figure Description

[0015] Figure 1 This is a flowchart of an automatic tuning method for the control parameters of a permanent magnet synchronous motor PI controller according to an embodiment of the present invention;

[0016] Figure 2 This is a block diagram of an automatic tuning device for the control parameters of a permanent magnet synchronous motor PI controller according to an embodiment of the present invention. Detailed Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0018] Figure 1 This is a flowchart of an automatic tuning method for the control parameters of a PI controller for a permanent magnet synchronous motor according to an embodiment of the present invention.

[0019] It should be noted that, in one embodiment of the present invention, a host computer system written in Qt (or other language software, such as Python) can be used to implement the automatic tuning method of the control parameters of the permanent magnet synchronous motor PI controller. The host computer can transmit control commands to the main control chip of the servo control system via a CAN bus (or a communication bus such as EtherCAT) to control the operation of the permanent magnet synchronous motor.

[0020] like Figure 1 As shown, the automatic tuning method for the control parameters of the PI controller of the permanent magnet synchronous motor according to an embodiment of the present invention may include the following steps:

[0021] S1, given the initial control parameters of the PI controller, controls the operation of the permanent magnet synchronous motor. The initial control parameters of the PI controller have an integral gain of zero and a proportional gain of the first proportional gain.

[0022] Specifically, in a PI controller, initial control parameters can be given first, i.e., the integral gain is set to zero and the proportional gain is set to the first proportional gain. Then, a square wave or step response is applied to drive the permanent magnet synchronous motor. The first proportional gain can be calibrated according to the actual situation.

[0023] S2 collects the phase current of the permanent magnet synchronous motor during operation and calculates the first overshoot of the control system of the permanent magnet synchronous motor based on the phase current.

[0024] Specifically, during the operation of the permanent magnet synchronous motor, the phase current of the permanent magnet synchronous motor can be dynamically collected by the control unit of the servo control system, and the collected phase current can be transmitted to the host computer through the CAN bus, so that the host computer can calculate the first overshoot of the control system (servo control system) of the permanent magnet synchronous motor based on the phase current.

[0025] The first overshoot of the control system can be calculated using the following formula based on the phase current of the permanent magnet synchronous motor and the given phase current:

[0026]

[0027] Where B1 is the first overshoot, Y1 is the phase current of the permanent magnet synchronous motor, and Y2 is the given phase current.

[0028] S3, determine whether the first overshoot is equal to zero.

[0029] S4, if so, then continuously increase the proportional gain of the PI controller according to the first preset multiple until the overshoot of the control system is greater than zero, and obtain the second proportional gain of the PI controller corresponding to the overshoot of the control system being greater than zero.

[0030] Specifically, when the initial control parameters of the PI controller are given and the permanent magnet synchronous motor is controlled according to the initial control parameters, the first overshoot of the permanent magnet synchronous motor control system can be calculated based on the phase current of the permanent magnet synchronous motor, and it can be determined whether the first overshoot is equal to zero, that is, whether the control system of the permanent magnet synchronous motor has overshoot.

[0031] As one possible implementation, if the first overshoot is zero, it indicates that the control system of the permanent magnet synchronous motor has not yet experienced overshoot. In this case, the proportional gain of the PI controller can be continuously increased according to a first preset multiple. For example, assuming the first preset multiple is K1 (greater than 1) and the first proportional gain is P1, the proportional gain of the PI controller can be increased to K1*P1, meaning the integral gain of the PI controller is zero and the proportional gain is K1*P1, controlling the permanent magnet synchronous motor to operate. During the operation of the permanent magnet synchronous motor, the overshoot of the control system of the permanent magnet synchronous motor is calculated using the above method, and it is determined whether the overshoot is greater than zero. If it is not greater than zero, i.e., equal to zero, the proportional gain of the PI controller is then increased to K1*K1*P1, meaning the integral gain of the PI controller is zero and the proportional gain is K1*K1*P1, controlling the permanent magnet synchronous motor to operate. This process is repeated until the overshoot of the control system is greater than zero. At this point, the second proportional gain of the PI controller corresponding to the overshoot of the control system being greater than zero can be obtained, that is, the first desired control parameter of the PI controller corresponding to the first occurrence of overshoot in the control system can be obtained, wherein the integral gain of the first desired control parameter of the PI controller is zero and the proportional gain is the second proportional gain.

[0032] Furthermore, in one embodiment of the present invention, after obtaining the second proportional gain of the PI controller corresponding to the overshoot of the control system being greater than zero, the method further includes: gradually adjusting the proportional gain of the PI controller according to the first proportional gain and the second proportional gain using a bisection method to obtain the third proportional gain of the PI controller corresponding to the zero-crossing point of the overshoot of the control system.

[0033] Specifically, the accuracy of the first desired control parameter of the PI controller obtained by the above method is relatively low. Therefore, after obtaining the second proportional gain of the PI controller corresponding to the overshoot of the control system being greater than zero through the above embodiments, the present invention can also use a bisection method to gradually adjust the proportional gain of the PI controller based on the first proportional gain and the second proportional gain. Specifically, assuming the first proportional gain is P1 and the second proportional gain is P2, the proportional gain of the PI controller can be adjusted first to P1. That is, the integral gain of the PI controller is zero and the proportional gain is... The system controls the operation of a permanent magnet synchronous motor (PMSM). During the operation of the PMSM, the overshoot of the control system is calculated using the method described above, and it is determined whether the overshoot is greater than zero. If it is greater than zero, the proportional gain of the PI controller is adjusted to... That is, the integral gain of the PI controller is zero and the proportional gain is... Control the operation of the permanent magnet synchronous motor, and during the operation of the permanent magnet synchronous motor, calculate the overshoot of the control system of the permanent magnet synchronous motor using the above method; if it is less than zero, adjust the proportional gain of the PI controller to... The system controls the operation of a permanent magnet synchronous motor (PMSM), and during the operation of the PMSM, the overshoot of the PMSM control system is calculated using the method described above. This process is repeated until the zero-crossing point of the overshoot of the control system is obtained, and the corresponding third proportional gain of the PI controller is obtained. This third proportional gain is then used as the proportional gain in the first desired control parameter. This allows for a more accurate acquisition of the first desired control parameter of the PI controller, i.e., the control parameter of the PI controller corresponding to the first occurrence of overshoot in the control system.

[0034] As another possible implementation, if the first overshoot is greater than zero, it indicates that the control system of the permanent magnet synchronous motor has overshooted during the operation of the permanent magnet synchronous motor under the given initial control parameters of the PI controller. In this case, the proportional gain of the PI controller can be continuously reduced by a third preset multiple until the overshoot of the control system is equal to zero, and the proportional gain of the PI controller corresponding to the zero overshoot of the control system can be obtained. Finally, the proportional gain of the PI controller is gradually adjusted using a binary search method to obtain the first desired control parameter of the PI controller. The specific tuning method can be referred to in the above embodiment, and will not be described in detail here to avoid redundancy.

[0035] S5, increase the integral gain of the PI controller to the first integral gain, and obtain the corresponding second overshoot of the control system.

[0036] Specifically, after obtaining the first desired control parameters of the PI controller through the above method, the proportional gain remains unchanged, and the integral gain is increased to the first integral gain to control the operation of the permanent magnet synchronous motor. During the operation of the permanent magnet synchronous motor, the phase current of the permanent magnet synchronous motor is dynamically collected by the control unit of the servo control system, and the collected phase current is transmitted to the host computer via the CAN bus, so that the host computer can calculate the second overshoot of the permanent magnet synchronous motor control system (servo control system) based on the phase current.

[0037] S6, determine whether the difference between the second overshoot and the preset overshoot is less than zero.

[0038] Different systems require different overshoot values; therefore, the preset overshoot value can be calibrated according to the actual situation (e.g., the system's requirements).

[0039] S7, if so, the integral gain of the PI controller is continuously increased by the second preset multiple until the difference is greater than zero, and the second integral gain of the PI controller corresponding to the difference being greater than zero is obtained.

[0040] Specifically, as one possible implementation, if the difference between the second overshoot and the preset overshoot is less than zero, it indicates that the overshoot of the permanent magnet synchronous motor control system has not yet reached the preset overshoot. In this case, the integral gain of the PI controller can be continuously increased according to the second preset multiple. For example, assuming the second preset multiple is K2 (greater than 1) and the first integral gain is I1, the integral gain of the PI controller can be increased to K2*I1, i.e., the integral gain of the PI controller is K2*I1 and the proportional gain is the third proportional gain, controlling the permanent magnet synchronous motor to operate. During the operation of the permanent magnet synchronous motor, the overshoot of the permanent magnet synchronous motor control system is calculated using the above method, and it is determined whether the difference between the overshoot and the preset overshoot is greater than zero. If it is less than zero, the integral gain of the PI controller is then increased to K2*K2*I1, i.e., the integral gain of the PI controller is K2*K2*I1 and the proportional gain is the third proportional gain, controlling the permanent magnet synchronous motor to operate. This process is repeated until the difference between the overshoot of the control system and the preset overshoot is greater than zero. When the difference between the overshoot of the control system and the preset overshoot first becomes greater than zero, no further adjustment is made. At this time, the second integral gain of the PI controller corresponding to the difference between the overshoot of the control system and the preset overshoot being greater than zero can be obtained. That is, the second desired control parameter of the PI controller corresponding to the first time the control system reaches the preset overshoot is obtained. In the second desired control parameter of the PI controller, the integral gain is the second integral gain and the proportional gain is the third proportional gain.

[0041] It should be noted that in actual operation, when the integral gain of the PI controller is the second integral gain and the proportional gain is the third proportional gain, the overshoot of the corresponding permanent magnet synchronous motor control system may also be equal to the preset overshoot. In this case, the second integral gain and the third proportional gain can be directly used as the second desired control parameter of the PI controller, without further tuning as follows. When the integral gain of the PI controller is the second integral gain and the proportional gain is the third proportional gain, and the overshoot of the corresponding permanent magnet synchronous motor control system is greater than zero compared to the preset overshoot, further tuning can be performed as follows to improve the accuracy of parameter tuning.

[0042] Furthermore, in one embodiment of the present invention, after obtaining the second integral gain of the PI controller corresponding to the difference being greater than zero, the method further includes: gradually adjusting the integral gain of the PI controller according to the first integral gain and the second integral gain using a binary search method to obtain the third integral gain of the PI controller corresponding to the point where the difference crosses zero.

[0043] Specifically, the accuracy of the second desired control parameter of the PI controller obtained by the above method is relatively low. Therefore, after obtaining the second integral gain of the PI controller corresponding to a difference greater than zero through the above embodiments, this invention can also use a binary search method to gradually adjust the integral gain of the PI controller based on the first integral gain and the second integral gain. Specifically, assuming the first integral gain is I1 and the second integral gain is I2, the integral gain of the PI controller can be adjusted first to... That is, the integral gain of the PI controller is The proportional gain is set to the third proportional gain, controlling the operation of the permanent magnet synchronous motor. During the operation of the permanent magnet synchronous motor, the overshoot of the control system is calculated using the above method, and it is determined whether the difference between the overshoot and the preset overshoot is greater than zero. If it is greater than zero, the integral gain of the PI controller is adjusted to... That is, the integral gain of the PI controller is The proportional gain is set to the third proportional gain to control the operation of the permanent magnet synchronous motor. During the operation of the permanent magnet synchronous motor, the overshoot of the control system is calculated using the above method. If it is less than zero, the integral gain of the PI controller is adjusted to... The system controls the operation of a permanent magnet synchronous motor (PMSM), and during the operation of the PMSM, the overshoot of the PMSM control system is calculated using the method described above. This process is repeated until the difference between the control system's overshoot and the preset overshoot crosses zero. The corresponding third integral gain of the PI controller is then obtained, and this third integral gain is used as the integral gain in the second desired control parameter. This allows for a more accurate acquisition of the second desired control parameter of the PI controller, which is the control parameter of the PI controller corresponding to the first occurrence of the preset overshoot in the control system.

[0044] As another possible implementation, if the difference between the second overshoot and the preset overshoot is greater than zero, it indicates that the overshoot of the permanent magnet synchronous motor control system has exceeded the preset overshoot. In this case, the integral gain of the PI controller can be continuously reduced by a fourth preset multiple until the difference between the control system's overshoot and the preset overshoot is less than zero. The integral gain of the PI controller corresponding to the point where the difference between the control system's overshoot and the preset overshoot is less than zero is then obtained. Finally, the proportional gain of the PI controller is gradually adjusted using a binary search method to obtain the second desired control parameter of the PI controller. The specific tuning method can be referred to in the above embodiment, and will not be detailed here to avoid redundancy.

[0045] In summary, the automatic tuning method for the control parameters of a permanent magnet synchronous motor PI controller according to an embodiment of the present invention involves: providing initial control parameters for the PI controller; controlling the operation of the permanent magnet synchronous motor; collecting the phase current of the permanent magnet synchronous motor during its operation; calculating the first overshoot of the control system based on the phase current; determining whether the first overshoot is equal to zero; continuously increasing the proportional gain of the PI controller by a first preset multiple when the first overshoot is equal to zero until the overshoot of the control system is greater than zero; obtaining the second proportional gain of the PI controller corresponding to the overshoot of the control system being greater than zero; increasing the integral gain of the PI controller to the first integral gain; obtaining the corresponding second overshoot of the control system; determining whether the difference between the second overshoot and the preset overshoot is less than zero; continuously increasing the integral gain of the PI controller by a second preset multiple when the difference is less than zero until the difference is greater than zero; and obtaining the second integral gain of the PI controller corresponding to the difference being greater than zero. Therefore, the control parameters of the PI controller can be automatically tuned based on the feedback results of the motor's dynamic performance using an experimental method, without manual intervention. The tuning process is simple and does not require the establishment of any model, thus greatly improving the accuracy of parameter tuning.

[0046] Corresponding to the above embodiments, the present invention also proposes an automatic tuning device for the control parameters of a PI controller for a permanent magnet synchronous motor.

[0047] like Figure 2 As shown, the automatic tuning device for the control parameters of the permanent magnet synchronous motor PI controller in this embodiment of the invention may include: a control module 100, a calculation module 200, a first judgment module 300, a first acquisition module 400, a second acquisition module 500, a second judgment module 600, and a third acquisition module 700.

[0048] The system comprises the following modules: a control module 100, which provides initial control parameters to the PI controller to control the operation of the permanent magnet synchronous motor (PMSM), wherein the integral gain of the PI controller is zero and the proportional gain is a first proportional gain; a calculation module 200, which collects the phase current of the PMSM during its operation and calculates the first overshoot of the control system based on the phase current; a first judgment module 300, which determines whether the first overshoot is equal to zero; a first acquisition module 400, which, when the first overshoot is equal to zero, continuously increases the proportional gain of the PI controller by a first preset multiple until the overshoot of the control system is greater than zero, and acquires the second proportional gain of the PI controller corresponding to the overshoot of the control system being greater than zero; a second acquisition module 500, which increases the integral gain of the PI controller to the first integral gain and acquires the corresponding second overshoot of the control system; a second judgment module 600, which determines whether the difference between the second overshoot and the preset overshoot is less than zero; and a third acquisition module 700, which, when the difference is less than zero, continuously increases the integral gain of the PI controller by a second preset multiple until the difference is greater than zero, and acquires the second integral gain of the PI controller corresponding to the difference being greater than zero.

[0049] According to one embodiment of the present invention, after the first acquisition module acquires the second proportional gain of the PI controller corresponding to the overshoot of the control system being greater than zero, it is further configured to: gradually adjust the proportional gain of the PI controller according to the first proportional gain and the second proportional gain using a bisection method to acquire the third proportional gain of the PI controller corresponding to the zero-crossing point of the overshoot of the control system.

[0050] According to one embodiment of the present invention, after the third acquisition module acquires the second integral gain of the PI controller corresponding to the difference being greater than zero, it is further configured to: gradually adjust the integral gain of the PI controller according to the first integral gain and the second integral gain using a binary search method to acquire the third integral gain of the PI controller corresponding to the point where the difference crosses zero.

[0051] It should be noted that a more specific implementation of the automatic tuning device for the control parameters of the permanent magnet synchronous motor PI controller in this embodiment of the invention can be found in the embodiment of the automatic tuning method for the control parameters of the permanent magnet synchronous motor PI controller described above, and will not be repeated here.

[0052] According to an embodiment of the present invention, an automatic tuning device for the control parameters of a permanent magnet synchronous motor PI controller controls the operation of the permanent magnet synchronous motor by providing initial control parameters to the PI controller through a control module. The initial control parameters of the PI controller include an integral gain of zero and a first proportional gain. A calculation module collects the phase current of the permanent magnet synchronous motor during its operation and calculates a first overshoot of the control system based on the phase current. A first judgment module determines whether the first overshoot is equal to zero. A first acquisition module continuously increases the proportional gain of the PI controller by a first preset multiple when the first overshoot is equal to zero until the overshoot of the control system is greater than zero. The device also acquires the second proportional gain of the PI controller corresponding to the overshoot being greater than zero. A second acquisition module increases the integral gain of the PI controller to the first integral gain and acquires the corresponding second overshoot of the control system. A second judgment module determines whether the difference between the second overshoot and the preset overshoot is less than zero. A third acquisition module continuously increases the integral gain of the PI controller by a second preset multiple when the difference is less than zero until the difference is greater than zero, and acquires the second integral gain of the PI controller corresponding to the difference being greater than zero. Therefore, the control parameters of the PI controller can be automatically tuned based on the feedback results of the motor's dynamic performance using an experimental method, without manual intervention. The tuning process is simple and does not require the establishment of any model, thus greatly improving the accuracy of parameter tuning.

[0053] Corresponding to the above embodiments, the present invention also proposes a computer device.

[0054] The computer device of this invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the above-described automatic tuning method for the control parameters of the permanent magnet synchronous motor PI controller.

[0055] According to the computer device of the present invention, when the processor executes the computer program stored in the memory, it can automatically tune the control parameters of the PI controller based on the feedback results of the dynamic performance of the motor using an experimental method. No manual intervention is required, the tuning process is simple, and no model needs to be established, thereby greatly improving the accuracy of parameter tuning.

[0056] Corresponding to the above embodiments, the present invention also proposes a non-transitory computer-readable storage medium.

[0057] The non-transitory computer-readable storage medium of this invention stores a computer program, which, when executed by a processor, implements the above-described automatic tuning method for the control parameters of the permanent magnet synchronous motor PI controller.

[0058] According to the non-transitory computer-readable storage medium of the present invention, when the processor executes the computer program stored thereon, it can automatically tune the control parameters of the PI controller based on the feedback results of the dynamic performance of the motor using an experimental method, without manual intervention. The tuning process is simple and does not require the establishment of any model, thereby greatly improving the accuracy of parameter tuning.

[0059] In the description of this invention, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. "A plurality of" means two or more, unless otherwise explicitly specified.

[0060] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0061] In this invention, unless otherwise explicitly specified and limited, "above" or "below" the second feature can mean that the first feature is in direct contact with the second feature, or that the first feature is in indirect contact with the second feature through an intermediate medium. Furthermore, "above," "over," and "on top" of the second feature can mean that the first feature is directly above or diagonally above the second feature, or simply that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature can mean that the first feature is directly below or diagonally below the second feature, or simply that the first feature is at a lower horizontal level than the second feature.

[0062] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0063] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0064] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0065] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0066] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.

Claims

1. An automatic tuning method for control parameters of a PI controller for a permanent magnet synchronous motor, characterized in that, Includes the following steps: Given the initial control parameters of the PI controller, the permanent magnet synchronous motor is controlled to operate, wherein the integral gain of the initial control parameters of the PI controller is zero and the proportional gain is the first proportional gain; During the operation of the permanent magnet synchronous motor, the phase current of the permanent magnet synchronous motor is collected, and the first overshoot of the control system of the permanent magnet synchronous motor is calculated based on the phase current. Determine whether the first overshoot is equal to zero; If so, the proportional gain of the PI controller is continuously increased by a first preset multiple until the overshoot of the control system is greater than zero, and the second proportional gain of the PI controller corresponding to the overshoot of the control system being greater than zero is obtained. Increase the integral gain of the PI controller to the first integral gain, and obtain the corresponding second overshoot of the control system; Determine whether the difference between the second overshoot and the preset overshoot is less than zero; If so, the integral gain of the PI controller is continuously increased by a second preset multiple until the difference is greater than zero, and the second integral gain of the PI controller corresponding to the difference being greater than zero is obtained.

2. The automatic tuning method for the control parameters of the PI controller of a permanent magnet synchronous motor according to claim 1, characterized in that, After obtaining the second proportional gain of the PI controller corresponding to a greater than zero overshoot of the control system, the method further includes: The proportional gain of the PI controller is gradually adjusted based on the first proportional gain and the second proportional gain using a binary method to obtain the third proportional gain of the PI controller corresponding to the zero-crossing point of the overshoot of the control system.

3. The automatic tuning method for the control parameters of the PI controller of a permanent magnet synchronous motor according to claim 2, characterized in that, After obtaining the second integral gain of the PI controller corresponding to the difference being greater than zero, the method further includes: The integral gain of the PI controller is gradually adjusted based on the first integral gain and the second integral gain using a binary search method to obtain the third integral gain of the PI controller corresponding to the zero-crossing point of the difference.

4. An automatic tuning device for the control parameters of a PI controller for a permanent magnet synchronous motor, characterized in that, include: A control module is provided, which is used to control the operation of the permanent magnet synchronous motor by giving the PI controller initial control parameters, wherein the integral gain of the PI controller is zero and the proportional gain is a first proportional gain in the initial control parameters. The calculation module is used to collect the phase current of the permanent magnet synchronous motor during the operation of the permanent magnet synchronous motor, and calculate the first overshoot of the control system of the permanent magnet synchronous motor based on the phase current. The first judgment module is used to determine whether the first overshoot is equal to zero. The first acquisition module is used to continuously increase the proportional gain of the PI controller by a first preset multiple when the first overshoot is equal to zero, until the overshoot of the control system is greater than zero, and acquire the second proportional gain of the PI controller corresponding to the overshoot of the control system being greater than zero. The second acquisition module is used to increase the integral gain of the PI controller to the first integral gain and acquire the corresponding second overshoot of the control system. The second judgment module is used to determine whether the difference between the second overshoot and the preset overshoot is less than zero. The third acquisition module is used to continuously increase the integral gain of the PI controller by a second preset multiple when the difference is less than zero, until the difference is greater than zero, and acquire the second integral gain of the PI controller corresponding to the difference being greater than zero.

5. The automatic tuning device for the control parameters of the permanent magnet synchronous motor PI controller according to claim 4, characterized in that, After acquiring the second proportional gain of the PI controller corresponding to the overshoot of the control system being greater than zero, the first acquisition module is further configured to: The proportional gain of the PI controller is gradually adjusted based on the first proportional gain and the second proportional gain using a binary method to obtain the third proportional gain of the PI controller corresponding to the zero-crossing point of the overshoot of the control system.

6. The automatic tuning device for the control parameters of the PI controller of the permanent magnet synchronous motor according to claim 5, characterized in that, After acquiring the second integral gain of the PI controller corresponding to the difference being greater than zero, the third acquisition module is further configured to: The integral gain of the PI controller is gradually adjusted based on the first integral gain and the second integral gain using a binary search method to obtain the third integral gain of the PI controller corresponding to the zero-crossing point of the difference.

7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the automatic tuning method for the control parameters of the permanent magnet synchronous motor PI controller according to any one of claims 1-3.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the automatic tuning method for the control parameters of the permanent magnet synchronous motor PI controller according to any one of claims 1-3.