Choosing the Best Embedded Motor Control Approach for Robotic Implementations
04 September 2023
Table 1: Service robot categories and market trends
Robots, which have been mainly used in factories for manufacturing purposes, are rapidly spreading to the spaces where we live and work - with their application scope expanding dramatically.
This is against the backdrop of staff shortages and soaring labour costs. In particular, service robots are active in a wide variety of fields, such as logistics, construction and medical care, plus domestic and office settings. This article outlines the motor control requirements for service robots.
Service robots assist and support the actions and tasks performed by humans, and their adoption is progressing rapidly, especially in jobs where there is little introduction risk involved. It is expected that the market will grow steadily in the coming years. There are various technological trends emerging, with demand for self-propelled obstacle detection, AI utilisation of position information mapping, image/voice recognition, remote operation, data analysis and cooperation with other robots all proving desirable.
The most fundamental technology is the control of moving parts within the robot. Effective motor control is necessary both for locomotion and joint movement too. There are several types of motors used in robots, but developers must understand these types and their control in accordance with the specific requirements of service robot functions.
Type of motor used in service robots
1.Brushless DC (BLDC) motors are small and lightweight. They are characterised by efficient heat dissipation and high durability. Dedicated circuits (featuring microcontrollers and power modules) are required for their control, but the controllability is good, with it being possible to alter the desired torque and rotation speed. In addition, BLDCs have long life, plus quiet operation. They are suitable for applications with varying loads and speeds. Position detection can be selected according to the application (such as Hall sensors, shunt resistors and encoders).
2.Stepping motors have axis positions that can be easily controlled. They are relatively inexpensive and have a wide range of uses. They are particular applicable when robots need to change their positioning frequently. A pulse is generated from the control side, a command is sent to the motor via the driver and an open loop control function is established. However, since there isn’t feedback control, this arrangement has disadvantages (including vibration and noise suppression issues). In addition, due to the torque being low at high-speed rotation, it is difficult to accelerate. Also, maintaining a constant speed can be problematic.
3.Servomotors are capable of position and speed control with high precision, though that admittedly comes with a higher cost. The mechanism via which commands are sent from the control side is the same as for a stepping motor. The difference here is that there is feedback from the motor to the driver and from the driver to the pulse generator. Servomotors are controlled by a feedback loop, with an encoder normally employed for position detection. Heightened torque can be maintained even during rapid rotation, with speed drops and deviations less likely to occur.
Table 2: Typical system control and motor control for each service robot
Service robot system configuration
The hardware configuration of service robots is generally divided into motor control (for moving purposes) and system control (which manages the entire robot’s operation). It is possible to build system control and motor control in one large SoC. However, the requirements of motor-side processing (which calls for real-time performance) and system-side functions in the host (incorporating human-machine interfacing, image/speech recognition, AI, etc.) are very different. Therefore, if all this is built into the same SoC, bus conflicts may occur - due to intra-chip communication and memory access. Consequently, the real-time performance of the motor may be greatly reduced. In addition, there are various system requirements to consider, including small-lot, high-mix development, plus addition of new functions - so it is not realistic to develop a SoC each time (due to the associated costs and the engineering effort that must be assigned).
In general, it is advantageous in terms of development efficiency to separate the hardware into the system control side and the motor control side, then elect the optimum microcontroller or microprocessor for each, and perform data communication using a common interface. On the motor side, even if various types of motors are used in service robot applications, there is no big difference in the required hardware configuration. In other words, most of the hardware and software can be reused, and from the perspective of development efficiency and cost reduction it is effective to develop a platform for the motor side as a common technology for robotic systems.
Microcontroller technology for motor control
Real-time performance is a vital aspect of robotic motor control. If such performance is lacking, there are cases where the responsiveness to indicated values deteriorates and safety capabilities decline. In a basic robot, the motor control microcontroller receives instructional data on the motor position and torque from the host system, calculates the position information and current value received from the motor at the same time, compares it with the instruction value, then changes the pulse-width modulation (PWM) waveform. In order to meet these requirements, motor control-optimised microcontrollers, such as the Arm core-based Renesas RA-T devices, provide performance which is specialised for motor control and peripheral functions - including analogue functions and PWM timers. In addition, they have communication peripherals (such as serial and CAN I/Os), plus the performance boosts offered by parallel processing.
Fast flash memory
Generally, when the central processing unit (CPU) accesses slow memory, it waits for the access to complete, so cache memory is used to reduce this overhead. However, in motor control programs, branch processing and interrupts occur frequently - thereby causing cache misses and impacting on performance. High-speed flash memory will reduce penalties even in the case of cache misses and achieve real-time performance with little fluctuation.
Figure 1: Effect of hardware accelerator
Accelerator for motor control
Trigonometric function unit (TFU) and IIR filter accelerator (IIRFA) for high-speed motor control calculations are also important. The TFU handles fast computation of sinf, cosf, atan2f and hypotf functions, excelling in vector-controlled coordinate transformations. Similarly, IIRFA can be applied to notch filters to suppress mechanical resonance. Coefficients and delay data can be saved in local memory, so calculation results may be obtained simply by setting input values. Since these accelerators support only the basic elements of motor control, they can be easily applied to various existing algorithms.
These 2 real-time performance-specific features lower performance variability and greatly reduce CPU load. As a result, sufficient time is secured for processing other than motor control, and coexistence with non-real-time processing (such as communication with the system control side) becomes possible.
So far, we’ve explained things from the perspective of motor control, but in the actual development of robotics applications, system control and motor control are combined in a complex manner. A simple architecture is preferred to reduce development risk. Robot operating system (ROS) is open source software used for robotic development. Since ROS supports multiple computer languages (C++, Python, etc.), it is possible to develop robots using familiar and easy-to-use languages. Renesas is working on a micro-ROS solution, an open source project using the 2nd generation ROS 2. By realising ROS 2 nodes on microcontrollers and utilising a common framework, it is possible to interoperate with conventional robots and IoT sensors.
Motor control is indispensable for robotic operation. It requires communication for cooperation with the host system, plus motor control - so a microcontroller which can control real-time and non-real-time multitasking is preferable. RA-T microcontrollers address such needs by incorporating high-speed flash memory and hardware accelerators for trigonometric functions and IIR filtering. This reduces processing time for motor controls and allow other tasks to be performed.
Figure 2: Hardware configuration example combining micro-ROS-based RA6M5/RA6T2 microcontrollers
Contact Details and Archive...