An AI-based intelligent servo motor driver and control method

CN115001320BActive Publication Date: 2026-09-22MATRIXTIME ROBOTICS (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210595280.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-28
Publication Date
2026-09-22
Estimated Expiration
2042-05-28

AI Technical Summary

Technical Problem

目前强化学习在伺服驱控领域的应用很少

Benefits of technology

[0030]1.本发明所述智能伺服驱动器通过引入AI算法,可有效提高控制精度,使驱动器在振动抑制、轨迹跟踪、能量消耗等驱动器关键指标上带来性能的提升;可推进在传统电机伺服驱动器的硬件方案上集成AI计算能力的应用。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115001320B_ABST
    Figure CN115001320B_ABST
Patent Text Reader

Abstract

The application discloses an AI-based intelligent servo motor driver and a control method, the controller comprises a main control chip and an AI chip which are in communication connection and data interaction, and a register for data access of the main control chip; the main control chip is in communication connection with an external motor for control and data interaction, and is used for preprocessing positions, speeds and currents of the external motor at different moments; the AI chip is used for acquiring data of the main control chip and performing inference processing; the driver is in communication connection with an external controller, the controller is an ethercat master station, and the driver is a slave station. The intelligent servo driver can effectively improve control precision and can bring improvement of key indicator performance of the driver by introducing an AI algorithm, and can promote application of AI computing capability integrated on a hardware scheme of a traditional motor servo driver.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of servo motor drive technology, and in particular to an AI-based intelligent servo motor driver and control method. Background Technology

[0002] Servo drives are essential basic industrial products, widely used in the control of various industrial motors. A servo drive mainly consists of two parts: hardware such as drive circuits and control algorithms. Traditional drives primarily use ARM chips, DSP chips, or various CPU chips on the x86 platform as the main control chip. Traditional servo controllers employ traditional methods such as PID control algorithms for various control tasks. However, in high-precision control tasks (such as rapid vibration suppression in point-to-point motion, high-precision track tracking, etc.), traditional servo controllers may experience insufficient control performance due to various reasons. For example, a relatively accurate dynamic model of the product is required. First, a precise dynamic model of the controlled object needs to be built, a step that requires years of experimental data. Second, the consistency requirements of the product are very high during the manufacturing and assembly process, which places high demands on the control precision of the machine tools used in the manufacturing process. In real-world applications, individual model identification is also required for each specific product, a step that requires calibration personnel to calibrate product parameters, resulting in high calibration costs.

[0003] The rapid development of modern artificial intelligence technology has already had a revolutionary impact on various application fields, leading a new generation of technological revolution. Among these, reinforcement learning, with its promising prospects for universal solutions, stands out. It has already been applied in areas such as Go, video games, autonomous driving, biomedical design, health prediction, and robot control. Currently, however, reinforcement learning is rarely used in servo drive control. Due to the unique challenges of high realism and precision in servo drive control, a series of improvements and adaptations are needed, including the introduction of AI chips and improvements to reinforcement learning training, inference, and evaluation algorithms.

[0004] Therefore, designing an AI-based intelligent servo motor driver and control method is of great significance. Summary of the Invention

[0005] The purpose of this invention is to provide an AI-based intelligent servo motor driver and control method to solve one of the many problems described above.

[0006] In view of this, the solution of the present invention is as follows:

[0007] An AI-based intelligent servo motor driver includes a main control chip and an AI chip that are connected and interact with each other for data exchange, as well as a register for the main control chip to access data. The main control chip is connected to an external motor for control and data exchange, and is used to preprocess the position, speed, and current of the external motor at different times. The AI ​​chip is used to acquire data from the main control chip and perform inference processing. The driver is connected to an external controller, which is an EtherCAT master station, and the driver is a slave station.

[0008] Furthermore, the communication content between the driver and the external controller includes: the actual position, actual speed, actual current, operating mode, target position, target speed, target current, and control parameters of the motor.

[0009] Furthermore, the driver includes a LAN9252 chip, which communicates and interacts with the controller and the main control chip, respectively.

[0010] Furthermore, the AI ​​chip is based on a float32 training model, which includes a single-step inference error. t and propagation error t+1 The calculation method is as follows:

[0011] Action t-f =f(w f b f S t );

[0012] Error t =f(w 32 b 32 s t )-f(w 16 b 16 s t );

[0013] s t+1 =F(s) t Action t-32 Error t );

[0014] Error t+1 =f(w 32 b 32 , st+1 )-f(w 16 b 16 s t+1 );

[0015] Where f is the network model, F is the state transition function of the motor system, w and b are 32-bit or 16-bit network parameters, and Error tLet s be the inference error at step t. t Let t be the system state at step t.

[0016] As a preferred embodiment of the present invention, the AI ​​chip operator is int8 and float16.

[0017] This invention proposes a control method for the intelligent servo motor driver described above, comprising the following steps:

[0018] S1. The main control chip preprocesses the position, speed and current information of the motor at different times;

[0019] The S2.AI chip performs inference on the preprocessed results and returns the results to the main control chip;

[0020] S3. The main control chip performs dimensional processing on the returned results and uses them as control instructions for the controller.

[0021] Furthermore, in step S2, the inference process employs nonlinear interpolation for frequency upsampling: the control frequency trained by the AI ​​algorithm is used to perform inference on the obtained model at the same frequency, while the gradient of each point is calculated using the three-point difference method, and interpolation is performed between every two inference points using a cubic nonlinear function.

[0022] As a preferred embodiment of the present invention, the nonlinear interpolation is performed by interpolating the inference result y(0) of the previous time step and the inference result y(3) of the next time step to solve for the results y(1) and y(2) of the two intermediate time steps, thereby obtaining the up-frequency control frequency. The algorithm is as follows:

[0023] y(t) = a + bt + ct 2 +dx 3 ;

[0024] y(0) = a;

[0025] y′(0)=b;

[0026] y(3) = a + 3b + 9c + 27d;

[0027] y′(3)=b+6c+27d;

[0028] Where y(t) is the required cubic function, t is the time step, and a, b, c, d are the required coefficients. y(0) is the first interpolation point of 4K sampling, y(3) is the second interpolation point, y'(0) is the gradient of the first point, and y'(3) is the gradient of the second interpolation point.

[0029] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0030] 1. The intelligent servo drive described in this invention can effectively improve control accuracy by introducing AI algorithms, thereby enhancing the drive's performance in key indicators such as vibration suppression, trajectory tracking, and energy consumption; it can also promote the integration of AI computing capabilities into the hardware solutions of traditional motor servo drives.

[0031] 2. Compared with the traditional communication between AI computing servers and drivers, this invention adds an EtherCAT communication channel, which can directly communicate between chips, improving communication speed and reducing the communication cost between AI chips and driver chips.

[0032] 3. The intelligent servo driver described in this invention can complete data exchange with the AI ​​chip through DMA without the need for computational processing by the main control chip, effectively reducing communication latency and facilitating the deployment of AI algorithms. In addition, the upsampling operation through nonlinear interpolation can effectively reduce the requirements for the inference performance of the AI ​​chip and reduce the power consumption of the overall solution. Attached Figure Description

[0033] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0034] Figure 1 This is a hardware schematic diagram of the intelligent servo motor driver of the present invention.

[0035] Figure 2 This is a schematic diagram of the control process of the intelligent servo motor driver of the present invention. Detailed Implementation

[0036] To make the objectives, technical solutions, and beneficial effects of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described in this specification are merely for explaining the invention and are not intended to limit the invention.

[0037] This invention proposes a servo motor driver based on an AI control algorithm, such as... Figure 1 As shown, specifically:

[0038] 1) This solution uses the low-power ARM chip STM32H750 as the main control chip. This chip supports multiple communication methods such as SPI, USRAT, USB, and I2C. In terms of computing power and communication, it can support functions such as motor control, integration of AI computing power, and high-speed real-time external motor communication.

[0039] 2) The AI ​​chip used in this solution is the domestically produced RK1808 chip, which supports mixed-precision inference. Typical AI training yields a float32 training model. In addition to single-step inference errors, the error in the AI ​​driver control algorithm must also consider the propagation error it causes to subsequent inference steps. This can be calculated using the following formula:

[0040] Action t-f =f(w f b f s t ) ①;

[0041] Error t =f(w 32 b 32 s t )-f(w 16 b 16 s t ) ②;

[0042] s t+1 =F(s) t Action t-32 Error t ③;

[0043] Error t+1 =f(w 32 b 32 s t+1 )-f(w 16 b 16 s t+1 ) ④.

[0044] Where f is the network model, F is the state transition function of the motor system, and w and b are 32-bit or 16-bit network parameters. t Let s be the inference error at step t. t For the system state at step t, Error t+1 The error is propagation error. As shown in the formula above, the error at step t+1 is determined by the error at step t, the state transition function F, the state s, and the single-step inference accuracy. Considering the cost of motion and the need for high inference accuracy in driver control, this scheme quantizes the model, converting its operators to int8 and float16. Therefore, an AI chip supporting mixed-precision handling is used. Data exchange between the STM32H750 and RK1808 is conducted via SPI. For the AI ​​control algorithm of the motor, the transmitted data needs to be preprocessed before being sent to the AI ​​chip. Post-processing is performed after obtaining the results. After obtaining the inference results from the AI ​​chip, the STM32H750 uses these results in the motor control algorithm. See the control process scheme for details.

[0045] 3) The external controller and the driver in this solution communicate via EtherCAT bus. The controller is the EtherCAT master, and the driver is the EtherCAT slave. The driver and controller communicate using the CANopen 402 protocol. Communication content includes: the motor's actual position, actual speed, actual current, operating mode, target position, target speed, target current, and control parameters, etc. Control parameters include: load inertia, reducer stiffness, reducer damping, and motor output shaft stiffness, etc.

[0046] 4) This driver uses the LAN9252 chip to implement the EtherCAT slave function. The STM32H750 and LAN9252 communicate via high-speed SPI. The master and slave stations operate in DC synchronous mode to achieve efficient clock synchronization, enabling multi-axis motor synchronous control through a single master station and multiple slave stations.

[0047] 4) The driver outputs a three-phase power supply via an H-bridge to drive the motor. The motor position is obtained by a high-speed encoder. The encoder is read directly by the main control chip through an external interrupt interface. The H-bridge control uses the FOC algorithm, with current loop control at a control frequency of 16kHz, speed loop control at a control frequency of 8kHz, and position loop control at a control frequency of 4kHz. Both the speed loop and position loop provide current feedforward.

[0048] The present invention also proposes a driver control process scheme, such as... Figure 2 As shown. Specifically includes:

[0049] 1) The STM32H750 driver uses the FreeRTOS real-time operating system. Real-time fixed-frequency control of the current loop, speed loop, and position loop is achieved through timer interrupts. In this architecture, the AI ​​chip only needs to handle AI calculations and does not need to consider pre- and post-processing data; therefore, a real-time Linux system or a customized Linux system can be used.

[0050] 2) AI data pre- and post-processing is performed on the STM32H750 chip. Pre-processing: The position, speed, and current of the motor at different times are combined into a time series and normalized. The normalized time series is used as input. All pre-processing input data is stored in a fixed register buffer queue, directly bound to the ethercat data block. All pre-processing result data is also stored in a fixed register and interacts with the AI ​​chip at a fixed frequency via the SPI bus using DMA. Post-processing: The results obtained from AI chip inference are generally normalized results or results transformed through other mapping relationships. Post-processing is required on the STM32H750 chip to obtain usable control data with normal dimensions. The processed data is also directly bound to the ethercat data block for direct output.

[0051] 3) Since the inference speed of AI chips is not easily achievable at a control frequency of 16K, a frequency upsampling process based on nonlinear interpolation is performed. Specifically: the AI ​​algorithm is trained at a control frequency of 4K to obtain a model. 4K frequency inference is performed, and the gradient of each point is calculated using the three-point difference method. Between every two inference points, interpolation is performed by optimizing a cubic nonlinear function. That is, from the inference result y(0) of the previous time step and the inference result y(3) of the next time step, the results y(1) and y(2) of the two intermediate time steps are interpolated, thus obtaining the 16K control frequency. This achieves the frequency upsampling operation for AI inference. The algorithm is shown in the following formula:

[0052] y(t) = a + bt + ct 2 +dx 3 ⑤;

[0053] y(0)=a ⑥;

[0054] y′(0)=b ⑦;

[0055] y(3)=a+3b+9c+27d ⑧;

[0056] y′(3)=b+6c+27d ⑨.

[0057] Where y(t) is the required cubic function, t is the time step, and a, b, c, and d are the required coefficients. y(0) is the first interpolation point of the 4K sampling, y(3) is the second interpolation point, y'(0) is the gradient of the first point, and y'(3) is the gradient of the second interpolation point. By solving the above equation, the four interpolation coefficients a, b, c, and d can be obtained, and then the values ​​of y(1) and y(2) can be calculated in real time, thereby realizing the control of the 16K frequency.

[0058] 4) In the above control process scheme, the AI ​​algorithm can be introduced at multiple control points. Specifically, this includes the current loop, speed loop, and position loop, which can be introduced into the control system as target values ​​or feedforward values ​​for each loop controller. However, it cannot be introduced into the basic FOC algorithm for motor drive.

[0059] Although embodiments of the invention have been shown and described, other advantages and modifications will be readily apparent to those skilled in the art. Therefore, the invention is not limited to the specific details, representative devices and illustrated examples shown and described herein without departing from the spirit and scope of the general concept as defined by the claims and their equivalents.

Claims

1. An AI-based intelligent servo motor driver, characterized in that, It includes a main control chip and an AI chip for communication and data interaction, as well as registers for the main control chip to access data. The main control chip communicates with an external motor for control and data interaction, and is used to preprocess the position, speed, and current of the external motor at different times. The AI ​​chip is used to acquire data from the main control chip and perform inference processing. The inference process uses nonlinear interpolation for frequency upscaling: the control frequency trained by the AI ​​algorithm is used to perform inference on the obtained model at the same frequency, and the gradient of each point is calculated using the three-point difference method. Between every two inference points, interpolation is performed using a cubic nonlinear function. The driver is communicat connected to an external controller, which is an EtherCAT master station and the driver is a slave station. The AI ​​chip is based on a float32 training model, which includes single-step inference error. Error t and propagation error Error t+1 The calculation method is as follows: ; ; ; ; in ,f For network models, F Let be the state transition function of the motor system. w and b For 32-bit or 16-bit network parameters, Error t Let be the inference error at step t. s t Let t be the system state at step t.

2. The intelligent servo motor driver according to claim 1, characterized in that, The communication between the driver and the external controller includes: the actual position, actual speed, actual current, operating mode, target position, target speed, target current, and control parameters of the motor.

3. The intelligent servo motor driver according to claim 1, characterized in that, The driver includes a LAN9252 chip, which communicates and interacts with the controller and the main control chip respectively.

4. The intelligent servo motor driver according to claim 1, characterized in that, The AI ​​chip operators are int8 and float16.

5. The control method of the intelligent servo motor driver according to any one of claims 1-4, characterized in that, Includes the following steps: S1. The main control chip preprocesses the position, speed and current information of the motor at different times; The S2.AI chip performs inference on the preprocessed results and returns the results to the main control chip; S3. The main control chip performs dimensional processing on the returned results and uses them as control instructions for the controller.

6. The control method according to claim 5, characterized in that, The nonlinear interpolation is based on the inference results from the previous time step. y (0) and the reasoning result of the next time step. y (3) Interpolation to solve for the results at the two intermediate time points. y (1) and y (2), and then the control frequency after frequency boosting is obtained. The algorithm is as follows: ; ; ; ; ; in, y (t) is the required cubic function. t For time steps, a , b , c , d For the required coefficient, y (0) is the first interpolation point of 4K sampling. y (3) is the second value interpolation point. y '(0) represents the gradient at the first point. y '(3) is the gradient of the second interpolation point.

Citation Information

Patent Citations

  • EtherCAT-based direct current common bus servo driving apparatus

    CN106849765A

  • Adjustment device and adjustment method

    CN108693834A