Share this

Design of a DSP-based motion controller for humanoid robots

2026-04-06 04:34:44 · · #1
Abstract: This paper designs a powerful and user-friendly robot motion control system using a DSP as the main processor of a robot controller, fundamentally solving various problems caused by microcontrollers. The controller employs position feedback and interacts with the main control computer in real time via a bus interface. The designed controller has a clear principle and structure, representing a new attempt in the field of robot control. Keywords: Robot motion controller, High-speed digital signal processor, CAN bus. Traditional robot motion controllers are mostly based on embedded microcontrollers, but their computing speed and processing power are far from meeting the needs of the rapid development of robot control systems, increasingly becoming a bottleneck hindering the progress of robot technology. With the continuous development of modern high technology represented by electronic computers and digital electronics, especially the emergence of high-speed digital signal processors—DSPs (Digital Signal Processors), the problem of insufficient computing power in embedded systems has been fundamentally solved, providing a new approach to improving robot motion control systems. This paper starts from this point, selecting the powerful DSP chip TMS320LF2407A as the main processor of the robot motion controller, designing a high-performance robot motion controller that significantly improves the overall motion performance of the robot. 1. Control System Structure The various movements of a robot are accomplished by its joint axes. Robot control is essentially the control of these joint axes. Each axis has one degree of freedom, capable of rotation in a specific direction. The coordinated movement of all axes simultaneously enables relatively complex actions. The humanoid walking robot recently developed by the Robotics Department of the College of Mechanical and Electrical Engineering and Automation at the National University of Defense Technology has an internal joint structure shown in Figure 1. This robot has 36 degrees of freedom, distributed across the lower limbs, upper limbs, head, and fingers. All axes are driven and controlled by PWM pulse signals. The task of the motion control system is to control these joint axes, specifically implemented by the underlying controllers. The entire control system adopts distributed control and can be structurally divided into three layers, as shown in Figure 2. 1.1 Main Control Computer Module The main control computer is the "brain" and command center of the control system, responsible for online motion planning, motion and control, voice interaction control, visual guidance control, and human-computer interaction. The main control computer needs to be small in size and have a high processing speed to meet the requirements of real-time robot control. High-performance small-board industrial control computers are typically used. It connects to the communication bus via a CAN bus interface card, interacting with and exchanging information with each underlying controller. 1.2 Communication Module Robot control involves a large amount of information, placing high demands on communication. Ensuring timely and accurate transmission of various information within the control system is crucial, making the choice of communication tools paramount. This paper selects the currently popular CAN bus as the communication standard. CAN (Controller Area Network) is the most widely used fieldbus and currently the only fieldbus with an international standard. Compared to general communication buses, its data communication offers outstanding reliability, real-time performance, and flexibility, meeting the design requirements described in this paper. The specific connection method is as follows: the main control computer connects to the bus via a CAN bus interface card, and each underlying controller connects to the bus via a bus transceiver. As long as all devices adhere to the same communication protocol, stable and reliable information transmission is possible. 1.3 Underlying Controller Module The controller is located at the lowest level of the entire control system, primarily used to control the specific execution processes of each motion joint axis. The controller receives control commands from the main control computer to control each joint axis, while simultaneously feeding back underlying information to the main control computer, achieving large-loop feedback to facilitate coordinated planning and unified management by the main control computer. The controller is the core of the entire control system and the focus of this paper; its performance directly affects the robot's motion capabilities. 2. Detailed Controller Design The specific structure of the DSP-based controller is shown in Figure 3. The entire controller can be divided into three parts according to its structure and function: the main processor and peripheral device unit, the feedback and execution unit, and the communication unit, as shown by the dotted lines in Figure 3. 2.1 Main Processor and Peripheral Device Unit The DSP main processor is the core of the entire controller; its processing speed and information processing capabilities directly affect the controller's performance. The TI TMS320LF2407A chip is selected. It is a high-end product in the TI C2000 series, integrating real-time processing capabilities and controller peripherals, making it very suitable for industrial control. Its main features include: a. 3.3V voltage, extremely low power consumption, and three low-power modes. b. Internally, it adopts a Harvard architecture, separating program and data memory, accessed via dedicated program and data buses, allowing simultaneous instruction fetching and execution, effectively improving access speed. c. Pipeline instruction technology allows multiple instructions to be executed simultaneously, with each instruction requiring approximately one instruction cycle on average, significantly improving instruction execution speed. The instruction cycle can reach the nanosecond level; at a 40 MHz clock frequency, each instruction only requires 25 ns. d. Dedicated hardware multiplier greatly improves operation speed and significantly enhances computing power. e. Both address and data buses are 16-bit. On-chip memory includes up to 32KB of Flash program memory, 2.5KB of data/program RAM, 544KB of dual-port RAM (DARAM), and 2KB of single-port RAM (SARAM). External memory can be expanded to include 64KB of program memory, 64KB of data memory, and 64KB of I/O space. f. It features a built-in watchdog timer, Serial Communication Interface (SCI) module, 16-bit Serial Peripheral Interface (SPI) module, SCI/SPI boot ROM, a 16-channel 10-bit ADC converter, 5 external interrupts, a PLL-based clock generator, and 41 individually programmable or multiplexed general-purpose input/output (GPIO) pins. g. Two event manager modules, each including two 16-bit general-purpose timers, eight 16-bit pulse width modulation (PWM) channels, programmable PWM dead-time control, three external event timing capture units, and an on-chip photoelectric encoder interface circuit. h. It has an internal CAN2.0B controller module. As can be seen, the TMS320LF2407A is very powerful; it is itself a small, independent control system. With appropriate peripheral components, it can achieve more complex control functions. In particular, its two event managers are very powerful, designed specifically for motor control. The TMS320LF2407A monitors the operation of each joint axis in real time through position sensors and interacts with the host computer via a bus. The TMS320LF2407A utilizes multiple PWM pulse channels to directly generate the PWM pulse signals required for controlling the shaft system. Its CAN bus controller module can communicate directly with the host computer without requiring an additional CAN bus controller. Software development for the TMS320LF2407A is also very easy, allowing for repeated programming. Once the program is compiled in its dedicated integrated development environment CCS (Code Composer Studio), it can be burned into the DSP's program memory using a single download cable via a standard JTAG interface. Online modification and debugging are also possible. The entire process is simple and convenient, requiring only a single download cable, greatly simplifying software development and significantly improving efficiency. An external watchdog circuit can monitor the controller voltage in real time, quickly resetting the main processor when an abnormal voltage occurs. The external memory stores the necessary parameters for the control algorithm and connects to the TMS320LF2407A via an SPI serial peripheral interface. 2.2 Feedback and Execution Unit The photoelectric encoder sensor converts the shaft position information into two pulse signals of equal width but 90° out of phase. The number of pulses is proportional to the shaft rotation angle, and the sign of the phase difference represents the direction of shaft rotation. Therefore, the actual position of the shaft can be obtained by counting the two pulses. The pulse signals are isolated by an opto-isolator and then sent to a dedicated pulse counter. The counted information is then sent to the DSP main processor. The DSP is not used for counting here for two reasons: first, to save DSP resources, allowing it to devote more time to calculations and other control functions; second, to improve the controller's flexibility, allowing the number of controlled shafts to be changed without modifying the main processor. The pulse counter uses a popular CPLD device, whose powerful functions greatly contribute to improving controller performance and can also serve as part of the decoding circuit, providing decoding signals to the main processor. The main processor calculates and analyzes the received shaft position information, combines it with new control commands to generate corresponding PWM pulse control signals, and sends them to the execution shaft to control its operation after opto-isolation and power amplification. 2.3 Communication Unit The main processor communicates with the main control computer via the CAN bus, receiving commands from the main control computer and feeding back low-level information to it, achieving higher-level feedback control. The DSP connects to the bus via a CAN bus receiver; opto-isolation is required to improve anti-interference capabilities. The overall controller structure is not complex, and the hardware implementation is simple, yet its functionality is very powerful. Each controller can control 6-12 axes simultaneously, adjustable according to actual conditions. 3 Control Flow and Analysis The entire control system's operation is shown in Figure 4. The specific flow is as follows: The main control computer plans the data offline, the system starts running and completes initialization; the main control computer sends control commands to the low-level controllers, while the low-level controllers sample the positions of each actuator axis and combine the two for analysis. A specific control algorithm generates corresponding PWM control signals, which are amplified and sent to the actuator axes. Simultaneously, the operating status of the low-level axes is uploaded to the main control computer, which then generates new commands based on the new situation and sends them to each controller, repeating this process. During this process, it is necessary to continuously check for interrupts. If an interrupt occurs, the corresponding interrupt service routine is executed, mainly to handle some abnormal situations. If a termination command is generated, the entire motion process ends. This is actually two closed-loop feedback processes. The lower-level controller performs small-loop feedback between sensors and each joint axis, while the main control computer performs large-loop feedback between each controller and each joint axis. This allows the robot to have more "intelligence" and better perform offline real-time control, which is also an important way for robots to develop towards intelligence. 4. Conclusion The controller designed in this paper uses a DSP as the main processor, which significantly improves performance compared to traditional microcontrollers. Its computing speed is significantly enhanced, and its control capability is greatly improved. It fundamentally solves the various problems brought about by using microcontrollers and finds a new direction for the development and improvement of robot control systems. It is also hoped that this will provide some inspiration for colleagues researching robots, enabling them to develop higher-performance products and make greater contributions to promoting the advancement of China's robotics industry.
Read next

CATDOLL 136CM Sasha (TPE Body with Hard Silicone Head)

Height: 136cm Weight: 23.3kg Shoulder Width: 31cm Bust/Waist/Hip: 60/54/68cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm An...

Articles 2026-02-22
CATDOLL 60CM Tami Silicone

CATDOLL 60CM Tami Silicone

Articles
2026-02-22
CATDOLL 108CM Coco

CATDOLL 108CM Coco

Articles
2026-02-22
CATDOLL 115CM Emelie TPE

CATDOLL 115CM Emelie TPE

Articles
2026-02-22