Research on DSP-based Joint Controller for Agricultural Robots
2026-04-06 06:25:27··#1
Agricultural robots can not only solve labor shortages but also improve labor productivity and the agricultural production environment. Research on agricultural robots has received widespread attention both domestically and internationally. The control system is the core of the robot, determining its performance and operational effectiveness. Open control platforms based on PC104 industrial computers and PMAC2-104 multi-axis motion control cards are widely used in agricultural robot control systems, but they are expensive. Since agricultural robots are purchased by farmers, their price must be low. The research objective of this project is to develop a four-joint motion control platform using an existing harvesting robot with four joints and one end effector as the control object. This platform aims to achieve high-precision control while minimizing the cost of the controller to reduce the overall cost of the robot, thereby promoting the future widespread adoption and application of agricultural robots. Selection of Joint Controller Scheme for Agricultural Robots High control precision, fast response speed, and low price are the three most important design indicators for joint controllers in agricultural robots. Due to the simple structure, fast dynamic response, and accurate positioning of permanent magnet synchronous motors, this study uses an AC servo motor from Yaskawa Electric Corporation as the actuator. The tasks required for robot control systems are substantial, placing high demands on both the hardware and software. This research employs a two-tier distributed architecture with upper and lower computer controllers. A PC serves as the upper computer, primarily handling system management, kinematic calculations, and communication. The lower computer controller consists of four independent joint controllers, each responsible for motion control and feedback signal processing for its respective joint; these controllers operate in parallel. DSP (Digital Signal Processor) chips, such as the TMS320X240X series, integrate dedicated peripherals, feature hardware multipliers, utilize a Harvard architecture, employ a pipelined instruction set, and use special DSP instructions, resulting in fast instruction cycles, high-speed computation, and the ability to process large amounts of data, enabling the implementation of complex control algorithms. Therefore, this study uses the TI TMS320LF2407A chip as the lower computer processor to perform Clarke transform, Park transform, inverse Park transform, and PID control functions. The control system employs a three-loop (current loop, velocity loop, position loop) position servo control scheme to ensure the positional accuracy of the control system. The system control block diagram is shown in Figure 1. [align=center] Figure 1 System control block diagram[/align] In this study, the control strategy with zero direct-axis armature current[7] is adopted, that is, the stator armature current of the pmsm is always equal to 0 during the control process, there is only a quadrature-axis component in the stator current, and the space vector of the stator magnetomotive force is orthogonal to the space vector of the rotor permanent magnet magnetic field, there is only a permanent magnet torque component in the motor torque, and the electromagnetic torque is proportional to the amplitude of the quadrature-axis armature current. The magnitude of the control torque is actually determined by the magnitude of the control stator current amplitude. The AC servo motor used in this project is a surface salient-pole pmsm. When the control strategy with zero direct-axis armature current is adopted, the unit stator current can obtain the maximum torque, the copper loss decreases, and the efficiency is improved. Hardware structure design of robot joint controller Since this project uses vector control method to control the servo motor, each motor needs 6 PWM signals to control the on/off of the IGBT in the intelligent power module IPM, while each DSP chip contains only two event managers, and can only control a maximum of two servo motors. This project fabricated two DSP-based motion control boards to control four AC servo motors. Figure 2 shows a schematic diagram of the joint controller hardware structure. The robot joint control system is divided into two hardware parts: a DSP-based control circuit and an IPM-based servo motor drive circuit. The joint controller control circuit consists of three main parts: the TMS320LF2407A minimum system part, the system expansion part, and the interface circuit part. The minimum system part includes a power supply circuit, a clock circuit, and a reset circuit; the system expansion part includes a memory expansion circuit, a bus expansion circuit, and a display circuit; the interface circuit part includes an RS232 interface circuit and a JTAG simulation interface. The power drive circuit board mainly implements the PWM inverter function, realizing the detection of motor phase current and position detection. The power drive circuit mainly consists of a power supply part, an inverter part, an isolation part, and a current acquisition part. This study selected Mitsubishi's PM15CSJ060 intelligent power module as the inverter module, used an M57140 module to provide four 15V voltages, and employed an HCPL4504 as the optocoupler isolation device. The power supply circuit, isolation circuit, and current acquisition circuit were designed. Robot Joint Controller Software Design The robot joint control system software consists of two parts: a PC-based upper-level controller software and a DSP-based lower-level controller software. The upper-level program, developed in Microsoft Visual C++, mainly includes four parts: the human-computer interface design, the main system program, the motion control function library, and the communication interface functions. The upper-level main program runs on the PC and is used to manage and control the entire system. The motion control function library is based on the kinematic models and solutions developed by other members of the laboratory, and related kinematic operation functions were written. The communication interface program enables communication between the upper-level PC and the DSP control board, transmitting the calculation results from the upper-level PC to the lower-level computer. This project uses API function programming. The lower-level controller software is designed based on a DSP-based joint control board and developed in the CCS 2.0 environment. The lower-level controller software mainly consists of three parts: an initialization module, a main program module, and an interrupt module. System initialization primarily configures the registers of resources such as the DSP kernel, event manager, general I/O, SCI, and ADC converters. The main program manages the entire joint controller and is designed in a loop-waiting mode. After initialization and joint reset, it waits for interrupt signals; if an interrupt occurs, the relevant interrupt routine is called. The interrupt module uses four interrupts: power protection interrupt, CAP3 interrupt, Timer 1 underflow interrupt, and serial communication interrupt. The Timer 1 underflow interrupt subroutine (int2) is responded to when Timer 1 overflows, used to call the control algorithm and execute the system's vector control program, completing once per carrier cycle. Experiments To test the performance of the agricultural robot joint controller studied in this project, experiments were conducted on the developed control system. The four AC servo motors used in the experiment were SGMAH02A (two), SGMAH01A, and SGMAH5A. The host PC, DSP slave motion control board, power drive board, and servo motors were connected according to the design requirements. The power was turned on, the PC was started, and the human-machine interface designed using VC++ was accessed. The motion test environment for a single motor is shown in Figure 3. [align=center]Figure 3 Motion test environment for a single motor[/align] In the experiment, the number of revolutions, speed, and direction of rotation for each joint motor were set. Clicking the "Start" button initiated motor operation. During the experiment, each joint motor was debugged. The experimental results show that the joint controller developed in this project can realize forward and reverse rotation and speed adjustment of the motor. During long-term motor operation, the DSP control circuit board and the IPM-based power drive board performed well.