Method and device for automatically adjusting motor control parameters using an automatic adjustment device

CN117891163BActive Publication Date: 2026-10-13QINGDAO SANYUAN TECH ELECTRONIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311856637.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-29
Publication Date
2026-10-13
Estimated Expiration
2043-12-29

AI Technical Summary

Technical Problem

而人工调试电机控制参数一方面会大大提高工作量;另一方面也会造成调试误差的存在,调试结果不够精确

Benefits of technology

[0006]根据本申请的一个方面,提供了一种存储指令的计算机可读介质,所述指令在被执行时使得系统进行如上所述任一方法的操作。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117891163B_ABST
    Figure CN117891163B_ABST
Patent Text Reader

Abstract

The application aims to provide a method and device for automatically debugging motor control parameters by using an automatic debugging device. The automatic debugging device comprises an upper computer, a power supply, a motor, a rotating speed sensor and a torque sensor. The upper computer is electrically connected with the motor controller, the power supply, the rotating speed sensor and the torque sensor respectively. The motor is electrically connected with the motor controller, the rotating speed sensor and the torque sensor. The power supply is also electrically connected with the motor controller. The method comprises the following steps: when the motor operates stably, the control efficiency of the motor controller is calculated and obtained based on real-time rotating speed information, real-time torque information, input voltage and input current; the optimal control efficiency is obtained by debugging the speed loop data and the current loop data; and the speed loop data and the current loop data corresponding to the optimal control efficiency are taken as the optimal speed loop data and the optimal current loop data. The automatic debugging of the motor control parameters is realized, the debugging efficiency is greatly improved, and the debugging error is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of parameter control, and in particular to a technique for automatically adjusting motor control parameters using automatic adjustment equipment. Background Technology

[0002] Optimal motor control parameters are crucial for ensuring stable motor operation. Currently, motor control parameters are typically adjusted manually. However, manual adjustment significantly increases workload and introduces errors, resulting in inaccurate results. Therefore, there is an urgent need for a method and equipment that can automatically adjust motor control parameters using automated adjustment devices. Summary of the Invention

[0003] One objective of this application is to provide a method and apparatus for automatically adjusting motor control parameters using an automatic adjustment device.

[0004] According to one aspect of this application, a method for automatically adjusting motor control parameters using an automatic adjustment device is provided. The automatic adjustment device includes a host computer, a power supply, a motor, a speed sensor, and a torque sensor. The host computer is electrically connected to the motor controller, the power supply, the speed sensor, and the torque sensor, respectively. The motor is electrically connected to the motor controller, the speed sensor, and the torque sensor. The power supply is also electrically connected to the motor controller. The method includes: When the motor is running stably, acquire speed loop data, current loop data, real-time speed information, real-time torque information, and the power supply's input voltage and input current. The control efficiency of the motor controller is calculated based on real-time speed information, real-time torque information, input voltage, and input current. Adjust the speed loop data and current loop data to obtain the optimal control efficiency, and use the speed loop data and current loop data corresponding to the optimal control efficiency as the optimal speed loop data and optimal current loop data.

[0005] According to one aspect of this application, a device for automatically adjusting motor control parameters is provided. The device includes: a host computer, a power supply, a motor, a speed sensor, and a torque sensor. The host computer is electrically connected to a motor controller, the power supply, the speed sensor, and the torque sensor, respectively. The motor is electrically connected to the motor controller, the speed sensor, and the torque sensor. The power supply is also electrically connected to the motor controller. The device further includes a processor. A memory configured to store computer-executable instructions, which, when executed, cause the processor to perform any of the operations described above.

[0006] According to one aspect of this application, a computer-readable medium is provided for storing instructions that, when executed, cause a system to perform any of the methods described above.

[0007] Compared with existing technologies, this application provides an automatic debugging device including a host computer, a power supply, a motor, a speed sensor, and a torque sensor. The host computer is electrically connected to the motor controller, the power supply, the speed sensor, and the torque sensor, respectively. The motor is electrically connected to the motor controller, the speed sensor, and the torque sensor, and the power supply is also electrically connected to the motor controller. When the motor is running stably, the control efficiency of the motor controller is calculated based on real-time speed information, real-time torque information, input voltage, and input current. By debugging the speed loop data and current loop data, the optimal control efficiency is obtained, and the speed loop data and current loop data corresponding to the optimal control efficiency are used as the optimal speed loop data and optimal current loop data. This achieves automatic debugging of motor control parameters, greatly improving debugging efficiency and reducing debugging errors. Attached Figure Description

[0008] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This invention illustrates a method for automatically adjusting motor control parameters using an automatic adjustment device according to an embodiment of the present application; Figure 2 This diagram illustrates the device structure of an automatic debugging device according to an embodiment of the present application. Figure 3 This diagram illustrates the structure of an automatic debugging device according to an embodiment of the present application. Figure 4 Exemplary systems that can be used to implement the various embodiments described in this application are shown.

[0009] Explanation of reference numerals in the attached figures: 1. Host computer; 2. Power supply; 3. Motor; 4. Speed ​​sensor; 5. Torque sensor; 6. Motor controller. Detailed Implementation

[0010] The present application will now be described in further detail with reference to the accompanying drawings.

[0011] In a typical configuration of this application, the terminal, the device of the service network, and the trusted party all include one or more processors (e.g., a central processing unit (CPU)), input / output interfaces, network interfaces, and memory.

[0012] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory. Memory is an example of computer-readable media.

[0013] Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PCM), programmable random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0014] The devices referred to in this application include, but are not limited to, terminals, network devices, or devices formed by integrating terminals and network devices through a network. The terminals include, but are not limited to, any mobile electronic product capable of human-computer interaction (e.g., via a touchpad), such as smartphones and tablets. These mobile electronic products can use any operating system, such as Android or iOS. The network devices include electronic devices capable of automatically performing numerical calculations and information processing according to pre-set or stored instructions. Their hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), and embedded devices. The network devices include, but are not limited to, computers, network hosts, single network servers, multiple network server clusters, or clouds composed of multiple servers. Here, a cloud consists of a large number of computers or network servers based on cloud computing, where cloud computing is a type of distributed computing, consisting of a virtual supercomputer composed of a group of loosely coupled computer clusters. The network includes, but is not limited to, the Internet, wide area network, metropolitan area network, local area network, VPN network, wireless ad hoc network, etc. Preferably, the device can also be a program running on the terminal, network device, or a device formed by integrating the terminal and network device, network device, touch terminal, or network device and touch terminal through a network.

[0015] Of course, those skilled in the art should understand that the above-described devices are merely examples, and other existing or future devices that are applicable to this application should also be included within the scope of protection of this application, and are hereby incorporated by reference.

[0016] In the description of this application, "multiple" means two or more, unless otherwise expressly and specifically defined.

[0017] Figure 1 This application illustrates a method for automatically adjusting motor control parameters using an automatic adjustment device, according to one embodiment of the present application. Figure 2As shown, the automatic debugging device includes a host computer 1, a power supply 2, a motor 3, a speed sensor 4, and a torque sensor 5. The host computer 1 is electrically connected to the motor controller 6, the power supply 2, the speed sensor 4, and the torque sensor 5, respectively. The motor 1 is electrically connected to the motor controller 6, the speed sensor 4, and the torque sensor 5. The power supply 2 is also electrically connected to the motor controller 6. The method includes steps S11, S12, and S13. In step S11, when the motor is running stably, speed loop data, current loop data, real-time speed information, real-time torque information, and the input voltage and input current of the power supply are acquired. In step S12, the control efficiency of the motor controller is calculated based on the real-time speed information, real-time torque information, input voltage, and input current. In step S13, the speed loop data and current loop data are debugged to obtain the optimal control efficiency, and the speed loop data and current loop data corresponding to the optimal control efficiency are used as the optimal speed loop data and optimal current loop data. In some embodiments, such as Figure 2 As shown, the automatic debugging device includes a host computer 1, a power supply 2, a motor 3, a speed sensor 4, and a torque sensor 5. The speed sensor 4 and torque sensor 5 are electrically connected to the motor 3, respectively, to collect real-time speed and torque information of the motor 3. The speed sensor 4 and torque sensor 5 are also electrically connected to the host computer 1, allowing the host computer 1 to acquire the real-time speed and torque information of the motor 3. Further, the automatic debugging device is electrically connected to a motor controller 6, so that during the debugging process, control commands for debugging control parameters are sent to the motor controller 6 to debug the control parameters, and after debugging, the optimal control parameters are stored in the motor controller 6. In some embodiments, specifically, the host computer 1 of the automatic debugging device is electrically connected to the motor controller 6 for receiving information and sending commands. In some embodiments, the motor controller 6 is also electrically connected to the motor 3 to control the operation of the motor 3. In some embodiments, the execution subject of the method described in this scheme specifically includes the host computer of the automatic debugging device. In some embodiments, the control parameters include, but are not limited to, speed loop data and current loop data. For example, the motor controller uses the automatic debugging equipment of this solution to automatically debug the control parameters. After the automatic debugging is completed, the optimal control parameters are obtained and stored in the motor controller so that the motor controller can control the operation of the motor based on the optimal control parameters in the future.

[0018] Specifically, in step S11, when the motor is running stably, speed loop data, current loop data, real-time speed information, real-time torque information, and the input voltage and current of the power supply are acquired. In some embodiments, different motors are subject to different operating conditions; specifically, the operating conditions can be understood as different motor loads. For example, the size of the fan driven by the motor may differ. The host computer sends a running command to the motor controller according to the preset operating conditions. The motor controller drives the motor to the preset state to obtain the optimal control parameters corresponding to the preset operating conditions through the automatic debugging equipment and method provided in this solution. The optimal control parameters are stored in the motor controller, and / or the preset operating conditions and their corresponding optimal control parameters are stored locally on the host computer so that the control parameters can be directly applied to control the motor operation under the preset operating conditions later. After the motor runs stably (e.g., the input power is stable, and the output power is stable), the host computer acquires speed loop data and current loop data through the motor controller; acquires real-time speed information of the motor through the speed sensor; acquires real-time torque information of the motor through the torque sensor; and acquires the input voltage and current of the power supply. Furthermore, the motor control parameters are automatically adjusted based on speed loop data, current loop data, real-time speed information, real-time torque information, and the input voltage and current of the power supply.

[0019] In step S12, the control efficiency of the motor controller is calculated based on the real-time speed information, real-time torque information, input voltage, and input current. In some embodiments, the host computer first calculates the control efficiency of the motor controller based on the real-time speed information, real-time torque information, input voltage, and input current of the motor, and then adjusts the control parameters based on the control efficiency.

[0020] In step S13, the speed loop data and current loop data are debugged to obtain the optimal control efficiency. The speed loop data and current loop data corresponding to this optimal control efficiency are then used as the optimal speed loop data and optimal current loop data. For example, after the host computer calculates and obtains the control efficiency of the motor controller, it begins to debug the speed loop data and current loop data. Those skilled in the art will understand that changes in the speed loop data and current loop data will lead to changes in the control efficiency of the motor controller. This embodiment finds the speed loop data and current loop data corresponding to the optimal control efficiency by debugging the speed loop data and current loop data, and uses this speed loop data and current loop data as the optimal speed loop data and optimal current loop data. For example, the host computer debugs the speed loop data and current loop data based on certain debugging rules. During the debugging process, the optimal control efficiency is found based on the changing trend of the control efficiency, so that the speed loop data and current loop data corresponding to this optimal control efficiency are used as the optimal speed loop data and optimal current loop data. For a detailed description of this embodiment, please refer to the corresponding embodiment below, which will not be repeated here.

[0021] In some embodiments, step S12 includes: calculating the output power of the motor based on real-time speed information and real-time torque information; calculating the input power of the motor controller based on input voltage and input current; and calculating the control efficiency of the motor controller based on the output power and input power. In some embodiments, the host computer calculates the output power and input power respectively to obtain the control efficiency based on the output power and input power. The control efficiency is used to determine the optimal control parameters based on the changing trend of the control efficiency when debugging control parameters later.

[0022] In some embodiments, specifically, step S12 includes: calculating the output power of the motor based on real-time speed information, real-time torque information, and a first calculation formula; and calculating the input power of the motor controller based on input voltage, input current, and a second calculation formula. Here, the first calculation formula includes: ,in, The calculation includes output power, where T includes real-time torque information and N includes real-time speed information; the second calculation formula includes: ,in, The input power is included, U includes the input voltage, and I includes the input current. The control efficiency of the motor controller is calculated based on the output power, input power, and a third calculation formula, which includes: Where E includes control efficiency. The control efficiency is specifically calculated through this embodiment.

[0023] In some embodiments, step S13 includes steps S131 (not shown), S132 (not shown), and S133 (not shown). In step S131, the speed loop data is debugged, and it is determined whether the speed loop data has completed one debugging cycle based on the trend of control efficiency changes. In step S132, if it is determined that the speed loop data has completed one debugging cycle, the current loop data is debugged, and it is determined whether the current loop data has completed one debugging cycle based on the trend of control efficiency changes. In step S133, the above debugging operation is repeated to obtain the optimal control efficiency, and the speed loop data and current loop data corresponding to the optimal control efficiency are taken as the optimal speed loop data and optimal current loop data. Here, those skilled in the art will understand that different speed loop data and current loop data may lead to changes in control efficiency. In this embodiment, the speed loop data is debugged first, and when it is determined that the speed loop data has completed one debugging cycle, the current loop data is then debugged. For example, the host computer sends a control command to the motor controller to increase or decrease the speed loop data, and the host computer determines whether the speed loop data has completed one debugging cycle based on the trend of control efficiency changes. When the host computer determines that the speed loop data has completed one debugging cycle, it sends a control command to the motor controller to increase or decrease the current loop data, and determines whether the current loop data has completed one debugging cycle based on the trend of control efficiency changes. In some embodiments, the trend of control efficiency changes includes increasing or decreasing. In some embodiments, the judgment condition for whether the speed loop data has completed one debugging cycle (in other words, one debugging cycle can also be called one round of debugging) includes: when changing (e.g., increasing or decreasing) the speed loop data, it will lead to a decrease in control efficiency, and at this time, it is determined that the speed loop data has completed one debugging cycle. When it is determined that the speed loop data has completed one debugging cycle, the debugging of the current loop data is triggered. Similarly, the judgment condition for whether the current loop data has completed one debugging cycle includes: when changing (e.g., increasing or decreasing) the current loop data, it will lead to a decrease in control efficiency, and at this time, it is determined that the speed loop data has completed one debugging cycle. Here, those skilled in the art will understand that the speed loop data and the current loop data may affect each other, so multiple rounds of cyclic adjustment are required to obtain the optimal control efficiency, and the speed loop data and current loop data corresponding to the optimal control efficiency are determined as the optimal speed loop data and the optimal current loop data. For example, the host computer monitors whether the control efficiency reaches the target threshold throughout the debugging process. If the target threshold is reached, the control efficiency at that time is determined to be the optimal control efficiency. As another example, if the control efficiency does not reach the target threshold within the preset debugging time, the highest control efficiency during the debugging process is selected as the optimal control efficiency (for example, the host computer records the changes in control efficiency during the debugging process, as well as the speed loop data and current loop data corresponding to each control efficiency).For example, the optimal control efficiency may be achieved after only one debugging of the speed loop data; or the optimal control efficiency may be achieved during the debugging of the speed loop data; or the optimal control efficiency may be obtained only after multiple rounds of debugging of the speed loop data and the current loop data.

[0024] In some embodiments, the speed loop data includes the speed loop proportional gain wr_kp and the speed loop integral gain wr_ki. Step S131 includes: adjusting the speed loop proportional gain wr_kp according to a first adjustment direction; if the control efficiency decreases, adjusting the speed loop proportional gain wr_kp according to a first reverse adjustment direction opposite to the first adjustment direction; if the control efficiency increases, continuing to adjust the speed loop proportional gain wr_kp according to the first adjustment direction until the control efficiency shows a decreasing trend, and determining that the speed loop proportional gain wr_kp has completed one adjustment; adjusting the speed loop integral gain wr_ki according to a second adjustment direction; if the control efficiency decreases, adjusting the speed loop integral gain wr_ki according to a second reverse adjustment direction opposite to the second adjustment direction; if the control efficiency increases, continuing to adjust the speed loop integral gain wr_ki according to the second adjustment direction until the control efficiency shows a decreasing trend, and determining that the speed loop integral gain wr_ki has completed one adjustment. Those skilled in the art will understand that the speed loop data includes the speed loop proportional gain wr_kp and the speed loop integral gain wr_ki. In some embodiments, the first adjustment direction includes an adjustment direction that increases or decreases a certain speed loop data. The first anti-tuning direction includes a tuning direction opposite to the first tuning direction. For example, if the first tuning direction includes a tuning direction that increases a certain speed loop data, then the first anti-tuning direction includes a tuning direction that decreases the speed loop data. For example, if the current speed loop proportional gain wr_kp is p1, the host computer first sends a control command to the motor controller to increase (e.g., the first tuning direction includes increasing p1). If the host computer detects a decreasing trend in control efficiency as p1 increases, it sends a control command to the motor controller to decrease p1. In some embodiments, if the host computer detects an increase in control efficiency as p1 decreases, it continues to send a control command to the motor controller to decrease p1. If further decreases when p1 decreases to p1' would lead to a decrease in control efficiency, then the speed loop proportional gain wr_kp is determined to have completed one tuning cycle, and the control efficiency and the corresponding speed loop data and current loop data are recorded. In other embodiments... If the host computer detects a decrease in control efficiency as p1 decreases, it determines that the speed loop proportional gain wr_kp has completed one debugging cycle. In some embodiments, after determining that the speed loop proportional gain wr_kp has completed one debugging cycle, the host computer stores the control efficiency at this time, along with the corresponding speed loop proportional gain wr_kp, speed loop integral gain wr_ki, and current loop data, for subsequent determination of the optimal control efficiency. Similarly, the speed loop integral gain wr_ki is also debugged using the above method to determine that the speed loop integral gain wr_ki has completed one debugging cycle. Since the debugging method for the speed loop integral gain wr_ki is the same as or similar to the debugging method for the speed loop proportional gain wr_kp, it will not be elaborated here.As those skilled in the art will understand, in some embodiments, a certain speed loop data or a certain current loop data may not actually be debugged. However, if a trend of decreasing control efficiency is observed during the debugging process, it is determined that a debugging of the speed loop data or current loop data has been completed so that the host computer can execute the next step.

[0025] In some embodiments, the current loop data includes q-axis data and d-axis data. Step S132 includes: debugging the q-axis data, determining whether the q-axis data has completed one debugging cycle based on the trend of control efficiency changes; if the q-axis data has completed one debugging cycle, debugging the d-axis data, determining whether the d-axis data has completed one debugging cycle based on the trend of control efficiency changes. Those skilled in the art will understand that the current loop data includes q-axis data and d-axis data. For the current loop data, the host computer first debugs the q-axis data, and after determining that the q-axis data has completed one debugging cycle, it then debugs the d-axis data. The debugging of the q-axis and d-axis data is the same as or similar to the debugging method for the speed loop data described above, determining whether the q-axis and d-axis data have completed one debugging cycle based on the trend of control efficiency changes. For example, the host computer sends a control command to the motor controller to increase or decrease the q-axis data. Further, the host computer determines whether the q-axis data has completed one debugging cycle based on the trend of control efficiency changes. If the q-axis data has completed one debugging cycle, the host computer then sends a control command to the motor controller to increase or decrease the d-axis data.

[0026] In some embodiments, the q-axis data includes the q-axis current proportional gain iq_kp and the q-axis current integral gain iq_ki, and the d-axis data includes the d-axis current proportional gain is_kp and the d-axis current integral gain id_ki. Step S132 includes: adjusting the q-axis current proportional gain iq_kp according to the third adjustment direction; if the control efficiency decreases, adjusting the q-axis current proportional gain iq_kp according to the third reverse adjustment direction opposite to the third adjustment direction; if the control efficiency increases, continuing to adjust the q-axis current proportional gain iq_kp according to the third adjustment direction until the control efficiency shows a decreasing trend, and determining that the q-axis current proportional gain iq_kp has completed one adjustment; adjusting the q-axis current integral gain iq_ki according to the fourth adjustment direction; if the control efficiency decreases, adjusting the q-axis current integral gain iq_ki according to the fourth reverse adjustment direction opposite to the fourth adjustment direction; if the control efficiency increases, continuing to adjust the q-axis current integral gain iq_ki according to the fourth adjustment direction. Adjust the d-axis current integral gain iq_ki in the fifth adjustment direction until the control efficiency shows a decreasing trend. If the control efficiency decreases, adjust the d-axis current proportional gain is_kp in the fifth reverse adjustment direction. If the control efficiency increases, continue adjusting the d-axis current proportional gain is_kp in the fifth adjustment direction until the control efficiency shows a decreasing trend. If the control efficiency increases, continue adjusting the d-axis current proportional gain is_kp in the fifth adjustment direction until the control efficiency shows a decreasing trend. If the control efficiency increases, continue adjusting the d-axis current integral gain is_ki in the sixth ... Here, those skilled in the art will understand that the q-axis data includes the q-axis current proportional gain iq_kp and the q-axis current integral gain iq_ki, and the d-axis data includes the d-axis current proportional gain is_kp and the d-axis current integral gain id_ki. In some embodiments, the adjustment methods for the q-axis current proportional gain iq_kp, the q-axis current integral gain iq_ki, the d-axis current proportional gain is_kp, and the d-axis current integral gain id_ki are the same as or similar to the adjustment methods for the speed loop proportional gain wr_kp and the speed loop integral gain wr_ki described above. For example, the third adjustment direction includes an adjustment direction that increases or decreases a certain q-axis current proportional gain iq_kp. The third reverse adjustment direction includes an adjustment direction opposite to the third adjustment direction. For example, if the third adjustment direction includes increasing the q-axis current proportional gain iq_kp, then the third reverse adjustment direction includes decreasing the q-axis current proportional gain iq_kp. For example, if the current q-axis current proportional gain iq_kp is qp1, the host computer first sends an increase command to the motor controller (for example, the first adjustment direction includes a control command to increase qp1).If the host computer detects a decreasing trend in control efficiency as qp1 increases, it sends a control command to the motor controller to decrease qp1. In some embodiments, if the host computer detects an increasing control efficiency as qp1 decreases, it continues to send control commands to the motor controller to decrease qp1. If further reduction of qp1 to qp1' would lead to a decrease in control efficiency, then the host computer determines that the q-axis current proportional gain iq_kp has completed one debugging cycle. In other embodiments, if the host computer detects a decreasing control efficiency as qp1 decreases, it determines that the q-axis current proportional gain iq_kp has completed one debugging cycle. In some embodiments, after determining that the q-axis current proportional gain iq_kp has completed one debugging cycle, the host computer stores the control efficiency, the q-axis current proportional gain iq_kp, and the q-axis current integral gain iq_ki at this time. The d-axis data includes the d-axis current proportional gain is_kp, the d-axis current integral gain id_ki, the speed loop proportional gain wr_kp, and the speed loop integral gain wr_ki, so as to subsequently determine the optimal control efficiency and the corresponding optimal speed loop data and current loop data. Similarly, the q-axis current integral gain iq_ki, d-axis current proportional gain is_kp, and d-axis current integral gain id_ki are also adjusted using the same method. Since the adjustment methods for q-axis current integral gain iq_ki, d-axis current proportional gain is_kp, and d-axis current integral gain id_ki are the same as or similar to those for q-axis current proportional gain iq_kp, they will not be elaborated upon here.

[0027] In some embodiments, in step S133 (not shown), the above debugging operation is repeated. If the control efficiency reaches the target threshold during the debugging process, it is determined that the control efficiency has reached the optimal control efficiency, and the speed loop data and current loop data corresponding to the optimal control efficiency are taken as the optimal speed loop data and optimal current loop data. Otherwise, the highest control efficiency that occurs during the debugging process is determined as the optimal control efficiency, and the speed loop data and current loop data corresponding to the optimal control efficiency are determined as the optimal speed loop data and optimal current loop data. Here, those skilled in the art will understand that the speed loop data and current loop data may affect each other, so multiple rounds of cyclic adjustment are required to obtain the optimal control efficiency, and the speed loop data and current loop data corresponding to the optimal control efficiency are determined as the optimal speed loop data and optimal current loop data. In some embodiments, for each control parameter (the control parameter includes speed loop data and current loop data), after each debugging, the host computer records the control efficiency and the corresponding speed loop data and current loop data at this time. For example, the host computer monitors whether the control efficiency reaches the target threshold throughout the debugging process. If the target threshold is reached, the control efficiency at this time is determined as the optimal control efficiency. For example, if the control efficiency does not reach the target threshold within the preset debugging time, the highest control efficiency observed during the debugging process is selected as the optimal control efficiency (for example, the host computer will record the changes in control efficiency during the debugging process, as well as the speed loop data and current loop data corresponding to each control efficiency). For example, the optimal control efficiency may be achieved after only one debugging of the speed loop data; or the optimal control efficiency may be achieved during the debugging of the speed loop data; or the optimal control efficiency may be obtained only after multiple rounds of debugging of the speed loop data and current loop data.

[0028] Figure 3 A schematic diagram of an automatic debugging device according to an embodiment of this application is shown. The device includes a first module, a second module, and a third module. The first module is used to acquire speed loop data, current loop data, real-time speed information, real-time torque information, and the input voltage and input current of the power supply when the motor is running stably. The second module is used to calculate the control efficiency of the motor controller based on the real-time speed information, real-time torque information, input voltage, and input current. The third module is used to debug the speed loop data and current loop data, obtain the optimal control efficiency, and use the speed loop data and current loop data corresponding to the optimal control efficiency as the optimal speed loop data and optimal current loop data.

[0029] Here, the specific implementation methods corresponding to Module 1, Module 2, and Module 3 are the same as or similar to the specific embodiments of steps S11, S12, and S13, and therefore will not be repeated here, but are included by reference.

[0030] In some embodiments, modules one and two are used to calculate the output power of the motor based on real-time speed information and real-time torque information, calculate the input power of the motor controller based on input voltage and input current, and calculate the control efficiency of the motor controller based on output power and input power.

[0031] Here, the specific implementation methods corresponding to modules one and two are the same as or similar to the specific embodiments of step S12, and therefore will not be repeated here, but are included by reference.

[0032] In some embodiments, modules one and two are used to calculate the output power of the motor based on real-time speed information, real-time torque information, and a first calculation formula, and to calculate the input power of the motor controller based on input voltage, input current, and a second calculation formula. Here, the first calculation formula includes: ,in, The calculation includes output power, where T includes real-time torque information and N includes real-time speed information; the second calculation formula includes: ,in, The input power is included, U includes the input voltage, and I includes the input current. The control efficiency of the motor controller is calculated based on the output power, input power, and a third calculation formula, which includes: E includes control efficiency.

[0033] Here, the specific implementation methods corresponding to modules one and two are the same as or similar to the specific embodiments of step S12, and therefore will not be repeated here, but are included by reference.

[0034] In some embodiments, module 131 includes module 131 (not shown), module 132 (not shown), and module 133 (not shown). Module 131 is used to debug the speed loop data and determine whether the speed loop data has completed one debugging cycle based on the trend of control efficiency changes. Module 132 is used to debug the current loop data if it is determined that the speed loop data has completed one debugging cycle, and determine whether the current loop data has completed one debugging cycle based on the trend of control efficiency changes. Module 133 is used to repeat the above debugging operation to obtain the optimal control efficiency, and use the speed loop data and current loop data corresponding to the optimal control efficiency as the optimal speed loop data and optimal current loop data.

[0035] Here, the specific implementation methods corresponding to modules 131, 132, and 133 are the same as or similar to the specific embodiments of steps S131, S132, and S133, and therefore will not be repeated here, but are included by reference.

[0036] In some embodiments, the speed loop data includes the speed loop proportional gain wr_kp and the speed loop integral gain wr_ki. The 131 module is used to adjust the speed loop proportional gain wr_kp according to a first adjustment direction. If the control efficiency decreases, the speed loop proportional gain wr_kp is adjusted according to a first reverse adjustment direction opposite to the first adjustment direction. If the control efficiency increases, the speed loop proportional gain wr_kp is adjusted according to the first adjustment direction until the control efficiency shows a decreasing trend, and it is determined that the speed loop proportional gain wr_kp has completed one adjustment. The speed loop integral gain wr_ki is adjusted according to a second adjustment direction. If the control efficiency decreases, the speed loop integral gain wr_ki is adjusted according to a second reverse adjustment direction opposite to the second adjustment direction. If the control efficiency increases, the speed loop integral gain wr_ki is adjusted according to the second adjustment direction until the control efficiency shows a decreasing trend, and it is determined that the speed loop integral gain wr_ki has completed one adjustment.

[0037] Here, the specific implementation methods corresponding to module 131 are the same as or similar to the specific embodiments of step S131, and therefore will not be repeated here, but are included by reference.

[0038] In some embodiments, the current loop data includes q-axis data and d-axis data. The 132 module is used to debug the q-axis data and determine whether the q-axis data has completed one debugging cycle based on the trend of control efficiency changes. If it is determined that the q-axis data has completed one debugging cycle, the d-axis data is debugged, and the trend of control efficiency changes is used to determine whether the d-axis data has completed one debugging cycle.

[0039] Here, the specific implementation methods corresponding to module 132 are the same as or similar to the specific embodiments of step S132, and therefore will not be repeated here, but are included by reference.

[0040] In some embodiments, the q-axis data includes the q-axis current proportional gain iq_kp and the q-axis current integral gain iq_ki, and the d-axis data includes the d-axis current proportional gain is_kp and the d-axis current integral gain id_ki. Module 132 is used to adjust the q-axis current proportional gain iq_kp according to the third adjustment direction. If the control efficiency decreases, the q-axis current proportional gain iq_kp is adjusted according to the third reverse adjustment direction, which is opposite to the third adjustment direction. If the control efficiency increases, the q-axis current proportional gain iq_kp is adjusted according to the third adjustment direction until the control efficiency shows a decreasing trend, indicating that the q-axis current proportional gain iq_kp has completed one adjustment. The q-axis current integral gain iq_ki is adjusted according to the fourth adjustment direction. If the control efficiency decreases, the q-axis current integral gain iq_ki is adjusted according to the fourth reverse adjustment direction, which is opposite to the fourth adjustment direction. If the control efficiency increases, the q-axis current integral gain iq_ki is adjusted according to the fourth adjustment direction. Continue adjusting the d-axis current proportional gain iq_ki in the fifth adjustment direction until the control efficiency shows a decreasing trend. If the control efficiency decreases, adjust the d-axis current proportional gain is_kp in the fifth reverse adjustment direction. If the control efficiency increases, continue adjusting the d-axis current proportional gain is_kp in the fifth adjustment direction until the control efficiency shows a decreasing trend. If the control efficiency increases, continue adjusting the d-axis current proportional gain is_kp in the fifth adjustment direction until the control efficiency shows a decreasing trend. If the control efficiency increases, continue adjusting the d-axis current integral gain is_ki in the sixth ...

[0041] Here, the specific implementation methods corresponding to module 132 are the same as or similar to the specific embodiments of step S132, and therefore will not be repeated here, but are included by reference.

[0042] In some embodiments, the 133 module is used to repeat the above debugging operation. If the control efficiency reaches the target threshold during the debugging process, it is determined that the control efficiency has reached the optimal control efficiency, and the speed loop data and current loop data corresponding to the optimal control efficiency are used as the optimal speed loop data and optimal current loop data; otherwise, the highest control efficiency that occurs during the debugging process is determined as the optimal control efficiency, and the speed loop data and current loop data corresponding to the control efficiency are used as the optimal speed loop data and optimal current loop data.

[0043] Here, the specific implementation methods corresponding to module 133 are the same as or similar to the specific embodiments of step S133, and therefore will not be repeated here, but are included by reference.

[0044] In addition to the methods and devices described in the above embodiments, this application also provides a computer-readable storage medium storing computer code that, when executed, performs the method described in any of the preceding embodiments.

[0045] This application also provides a computer program product that, when executed by a computer device, performs the method described in any of the preceding claims.

[0046] This application also provides a computer device, the computer device comprising: One or more processors; Memory, used to store one or more computer programs; When the one or more computer programs are executed by the one or more processors, the one or more processors cause the one or more processors to perform the method as described in any of the preceding methods.

[0047] Figure 4 Exemplary systems that can be used to implement the various embodiments described in this application are shown; such as Figure 4 As shown in some embodiments, system 300 can function as any of the devices described in each of the embodiments. In some embodiments, system 300 may include one or more computer-readable media having instructions (e.g., system memory or NVM / storage device 320) and one or more processors (e.g., one or more processors 305) coupled to the one or more computer-readable media and configured to execute the instructions to implement the module and thus perform the actions described in this application.

[0048] In one embodiment, the system control module 310 may include any suitable interface controller to provide any suitable interface to at least one of the processors 305 and / or any suitable device or component communicating with the system control module 310.

[0049] The system control module 310 may include a memory controller module 330 to provide an interface to the system memory 315. The memory controller module 330 may be a hardware module, a software module, and / or a firmware module.

[0050] System memory 315 can be used, for example, to load and store data and / or instructions for system 300. In one embodiment, system memory 315 may include any suitable volatile memory, such as suitable DRAM. In some embodiments, system memory 315 may include double data rate type quad synchronous dynamic random access memory (DDR4 SDRAM).

[0051] In one embodiment, the system control module 310 may include one or more input / output (I / O) controllers to provide interfaces to the NVM / storage device 320 and (one or more) communication interfaces 325.

[0052] For example, NVM / storage device 320 may be used to store data and / or instructions. NVM / storage device 320 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable (one or more) non-volatile storage devices (e.g., one or more hard disk drives (HDDs), one or more optical disc drives (CDs), and / or one or more digital universal optical disc (DVD) drives).

[0053] NVM / storage device 320 may include storage resources that are physically part of a device on which system 300 is mounted, or that can be accessed by the device without necessarily being part of it. For example, NVM / storage device 320 may be accessed via a network through one or more communication interfaces 325.

[0054] One or more communication interfaces 325 may provide the system 300 with an interface to communicate over one or more networks and / or with any other suitable device. The system 300 may wirelessly communicate with one or more components of a wireless network in accordance with any of one or more wireless network standards and / or protocols.

[0055] In one embodiment, at least one of the processors 305 may be logically packaged with one or more controllers of the system control module 310 (e.g., memory controller module 330). In one embodiment, at least one of the processors 305 may be logically packaged with one or more controllers of the system control module 310 to form a system-in-package (SiP). In one embodiment, at least one of the processors 305 may be integrated with the logic of one or more controllers of the system control module 310 on the same die. In one embodiment, at least one of the processors 305 may be integrated with the logic of one or more controllers of the system control module 310 on the same die to form a system-on-a-chip (SoC).

[0056] In various embodiments, system 300 may be, but is not limited to, a server, workstation, desktop computing device, or mobile computing device (e.g., laptop computing device, handheld computing device, tablet computer, netbook, etc.). In various embodiments, system 300 may have more or fewer components and / or different architectures. For example, in some embodiments, system 300 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touchscreen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.

[0057] It should be noted that this application can be implemented in software and / or a combination of software and hardware, for example, using an application-specific integrated circuit (ASIC), a general-purpose computer, or any other similar hardware device. In one embodiment, the software program of this application can be executed by a processor to implement the steps or functions described above. Similarly, the software program of this application (including related data structures) can be stored in a computer-readable recording medium, such as RAM memory, a magnetic or optical drive, a floppy disk, or similar devices. Furthermore, some steps or functions of this application can be implemented in hardware, for example, as circuitry that cooperates with a processor to perform the various steps or functions.

[0058] Furthermore, a portion of this application can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to this application through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0059] Communication media include media through which communication signals containing, for example, computer-readable instructions, data structures, program modules, or other data are transmitted from one system to another. Communication media can include guided transmission media (such as cables and wires (e.g., optical fibers, coaxial cables, etc.)) and wireless (unguided transmission) media capable of propagating energy waves, such as sound, electromagnetic, RF, microwave, and infrared. Computer-readable instructions, data structures, program modules, or other data can be embodied as modulated data signals in, for example, wireless media (such as carrier waves or similar mechanisms embodied as part of spread spectrum technology). The term "modulated data signal" refers to a signal whose one or more characteristics are altered or set in a manner that encodes information in the signal. Modulation can be analog, digital, or a hybrid modulation technique.

[0060] By way of example and not limitation, computer-readable storage media may include volatile and non-volatile, removable and non-removable media implemented by any method or technique for storing information such as computer-readable instructions, data structures, program modules or other data. For example, computer-readable storage media include, but are not limited to, volatile memories such as random access memory (RAM, DRAM, SRAM); and non-volatile memories such as flash memory, various read-only memories (ROM, PROM, EPROM, EEPROM), magnetic and ferromagnetic / ferroelectric memories (MRAM, FeRAM); and magnetic and optical storage devices (hard disks, magnetic tapes, CDs, DVDs); or other media now known or hereafter developed capable of storing computer-readable information / data for use by a computer system.

[0061] Herein, one embodiment of this application includes an apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the apparatus is triggered to run a method and / or technical solution based on the foregoing embodiments of this application.

[0062] It will be apparent to those skilled in the art that this application is not limited to the details of the exemplary embodiments described above, and that this application can be implemented in other specific forms without departing from the spirit or essential characteristics of this application. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of this application is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within this application. No reference numerals in the claims should be construed as limiting the scope of the claims. Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in the apparatus claims may also be implemented by a single unit or device in software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any particular order.

Claims

1. A method for automatically adjusting motor control parameters using automatic adjustment equipment, characterized in that, The automatic debugging equipment includes a host computer, a power supply, a motor, a speed sensor, and a torque sensor. The host computer is electrically connected to the motor controller, the power supply, the speed sensor, and the torque sensor. The motor is electrically connected to the motor controller, the speed sensor, and the torque sensor. The power supply is also electrically connected to the motor controller. The method includes: When the motor is running stably, acquire speed loop data, current loop data, real-time speed information, real-time torque information, and the input voltage and input current of the power supply; wherein, the speed loop data includes the speed loop proportional gain wr_kp and the speed loop integral gain wr_ki; the current loop data includes q-axis data and d-axis data; The control efficiency of the motor controller is calculated based on the real-time speed information, real-time torque information, input voltage, and input current. If the control efficiency decreases, the speed loop proportional gain wr_kp is adjusted in the first adjustment direction. If the control efficiency increases, the speed loop proportional gain wr_kp is adjusted in the first reverse adjustment direction. If the control efficiency increases, the speed loop proportional gain wr_kp is adjusted in the first adjustment direction until the control efficiency shows a decreasing trend. Once the speed loop proportional gain wr_kp has completed one adjustment, it is determined that the adjustment is complete. If the control efficiency decreases, the speed loop integral gain wr_ki is adjusted in the second adjustment direction. If the control efficiency increases, the speed loop integral gain wr_ki is adjusted in the second reverse adjustment direction. If the control efficiency increases, the speed loop integral gain wr_ki is adjusted in the second adjustment direction until the control efficiency shows a decreasing trend. Once the speed loop integral gain wr_ki has completed one adjustment, it is determined that the adjustment is complete. The q-axis data is debugged, and the q-axis data is determined to have completed one debugging cycle based on the changing trend of the control efficiency. If it is determined that the q-axis data has completed one debugging cycle, the d-axis data is then debugged, and the d-axis data is determined to have completed one debugging cycle based on the trend of the control efficiency. Repeat the above debugging operation to obtain the optimal control efficiency, and use the speed loop data and current loop data corresponding to the optimal control efficiency as the optimal speed loop data and optimal current loop data.

2. The method according to claim 1, characterized in that, The step of calculating and obtaining the control efficiency of the motor controller based on the real-time speed information, real-time torque information, input voltage, and input current includes: The output power of the motor is calculated based on the real-time speed information and real-time torque information, and the input power of the motor controller is calculated based on the input voltage and input current. The control efficiency of the motor controller is calculated based on the output power and input power.

3. The method according to claim 2, characterized in that, The output power of the motor is calculated based on the real-time speed information and real-time torque information, and the input power of the motor controller is calculated based on the input voltage and input current. The control efficiency of the motor controller is calculated based on the output power and input power, including: The output power of the motor is calculated based on the real-time speed information, real-time torque information, and the first calculation formula. The input power of the motor controller is calculated based on the input voltage, input current, and the second calculation formula. Here, the first calculation formula includes: , wherein The output power is included, T includes the real-time torque information, and N includes the real-time speed information; the second calculation formula includes: , wherein The input power is included, U includes the input voltage, and I includes the input current; The control efficiency of the motor controller is calculated based on the output power, input power, and a third calculation formula. Here, the third calculation formula includes: Wherein, E includes the control efficiency.

4. The method according to claim 1, characterized in that, The q-axis data includes the q-axis current proportional gain iq_kp and the q-axis current integral gain iq_ki, and the d-axis data includes the d-axis current proportional gain is_kp and the d-axis current integral gain id_ki. The process of debugging the q-axis data involves determining whether a debugging cycle has been completed based on the trend of the control efficiency. If the q-axis data has been determined to have completed a debugging cycle, the process of debugging the d-axis data involves determining whether a debugging cycle has been completed based on the trend of the control efficiency, including: If the control efficiency decreases, adjust the q-axis current proportional gain iq_kp in the third adjustment direction. If the control efficiency increases, continue adjusting the q-axis current proportional gain iq_kp in the third adjustment direction until the control efficiency shows a decreasing trend. Once the q-axis current proportional gain iq_kp has completed one adjustment, it is determined that the adjustment is complete. If the control efficiency decreases, the q-axis current integral gain iq_ki is adjusted in the fourth adjustment direction. If the control efficiency increases, the q-axis current integral gain iq_ki is adjusted in the fourth reverse adjustment direction. If the control efficiency increases, the q-axis current integral gain iq_ki is adjusted in the fourth adjustment direction until the control efficiency shows a decreasing trend. Once the q-axis current integral gain iq_ki has completed one adjustment, it is determined that one adjustment of the q-axis current integral gain iq_ki is complete. If the control efficiency decreases, adjust the d-axis current proportional gain is_kp according to the fifth adjustment direction. If the control efficiency increases, continue to adjust the d-axis current proportional gain is_kp according to the fifth adjustment direction until the control efficiency shows a decreasing trend. Then, determine that the d-axis current proportional gain is_kp has completed one adjustment. If the control efficiency decreases, adjust the d-axis current integral gain id_ki in the sixth adjustment direction (the opposite of the sixth adjustment direction). If the control efficiency increases, continue adjusting the d-axis current integral gain id_ki in the sixth adjustment direction until the control efficiency shows a decreasing trend. Then, determine that the d-axis current integral gain id_ki has completed one adjustment.

5. The method according to claim 1, characterized in that, The process of repeating the above debugging operation to obtain the optimal control efficiency, and using the speed loop data and current loop data corresponding to the optimal control efficiency as the optimal speed loop data and optimal current loop data, includes: Repeat the above debugging operation. If the control efficiency reaches the target threshold during the debugging process, it is determined that the control efficiency has reached the optimal control efficiency, and the speed loop data and current loop data corresponding to the optimal control efficiency are taken as the optimal speed loop data and optimal current loop data; otherwise, the highest control efficiency that occurs during the debugging process is determined as the optimal control efficiency, and the speed loop data and current loop data corresponding to the control efficiency are taken as the optimal speed loop data and optimal current loop data.

6. A computer device for automatically adjusting motor control parameters, characterized in that, The device includes a host computer, a power supply, a motor, a speed sensor, and a torque sensor. The host computer is electrically connected to the motor controller, the power supply, the speed sensor, and the torque sensor, respectively. The motor is electrically connected to the motor controller, the speed sensor, and the torque sensor. The power supply is also electrically connected to the motor controller. The device further includes a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps of the method as described in any one of claims 1 to 5.

7. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Motor control method and device, and storage medium

    CN113489405A

  • Electric drive

    SU790090A1