Robots have unique demands on MCUs. MCUs optimized for robotics often include features including built-in Internet Protocol (IP) connectivity, information security and functional safety protection, and advanced control algorithms. Integrating MCU cores with field programmable gate arrays (FPGAs) is one means of optimizing robotic applications. The Robot Operating System (ROS), originally optimized for higher performance central processing units (CPUs), has been simplified and released as Micro-ROS to run on embedded MCUs and other resource-poor environments, further increasing the usefulness of MCUs in robotics.
Purchases of MCUs for robotics continue to multiply. This FAQ will review basic robotics platform architectures, with particular emphasis on the use of MCUs; it reviews the performance options that open up when MCU cores are integrated with FPGAs, and it reviews the benefits of using micro-ROS. The MCU is an important element in robotics design. Even simple consumer robots can contain multiple MCUs for specialized functions such as communications, user interfaces, USB, and motor control (Figure 1).
Figure 1: Even a relatively simple robotic vacuum cleaner can have multiple MCUs to handle specialized user interface, connectivity, and motor control tasks. (Image: Microchip)
The emergence of smart factories and Industry 4.0 is driving the need for increasingly sophisticated and complex industrial robots. Growing demands, including network communications, functional safety requirements, and predictive maintenance, require MCUs with higher performance peripherals and accelerators. Heterogeneous multi-core MCUs typically run at 800 MHz to 1GHz. Processing speed is critical to support high-precision control of motor position, direction, speed, and torque in multi-axis robots.
High-performance MCUs for robotics include dedicated accelerator hardware to support the calculations required for servo control. In some cases, current control loop calculations can be completed within 1.5µs. In a servo motor drive system, the control loop can be divided into multiple levels, including higher-level motion control loops, position loops, speed loops, and torque/current loops, arranged in a cascade topology (Figure 2). The upstream control loop is multiple of the downstream control loop and provides reference data for the downstream, where the torque or current loop is the most stringent control loop.
Figure 2: Servo motor control loop cascade topology. (Image: Texas Instruments)
The control loops in the above architecture can be implemented on different cores in a multicore MCU or divided between the MCU cores and the FPGA. The partitioned optimization maximizes the available processing bandwidth by spreading the loops among independent computing resources. Each processing core can quickly run its specific algorithm, passing the results down for use in the next loop. At the same time, it continues to provide other functions as needed until the next set of input data arrives and the algorithm starts again.
A single MCU core requires a high level of performance to have the bandwidth available to quickly process basic algorithms and provide the additional functionality required by the system. With cycle times approaching 31.25 µs in a 32 kHz control loop, or inputs from multiple axes must be processed almost simultaneously, fast processing is a must. Sometimes it may require a combination of one or more high-performance MCUs plus an FPGA.
MCU, FPGA and eFPGA
In robotic systems, the combination of MCUs and FPGAs can provide a more suitable solution than either product alone. MCUs are flexible and easy to program. MCUs can also handle a certain level of parallelism, but eventually the core may become a bottleneck for higher levels of parallel performance. FPGAs consist of thousands of logic blocks that can be configured for massively parallel processing. FPGAs can also provide a higher level of flexibility, but they tend to be more expensive.
MCUs are well suited for handling routine functions such as multi-axis servo control. FPGAs can contain a large number of DSP blocks and programmable logic to support the parallel processing required for artificial intelligence (AI), machine learning (ML), and convolutional neural network (CNN) inference algorithms. The more AI/ML/CNN functionality required on a robotics platform, the greater the benefit of combining an FPGA with an MCU.
Users can use one of a variety of microcontroller software development tools. In the case of FPGAs, the logic is not fixed, but the device is "programmed" to perform specific functions by designing the interconnect structure in hardware. These differences lead to cost and performance trade-offs between MCUs and FPGAs (Figure 3).
Figure 3: FPGAs and MCUs offer a variety of performance and cost trade-offs to robotics platform designers. (Image: Digilent)
According to the specific design needs, there are three ways to combine MCU and FPGA:
MCU and FPGA can be combined into two discrete components
FPGAs can contain an integrated MCU core
The MCU may include an integrated FPGA section
Each of these approaches has its merits. For applications that require both high-performance servo control capabilities and extensive AI/ML/CNN functionality, a high-performance MCU can be combined with a separate large FPGA. The MCU might be used for control functions, while the FPGA is used for more intensive AI and machine learning activities on a robotics platform. In situations where massive parallel processing is required and AI/ML/CNN dominates, the MCU core can be integrated with a large FPGA. In situations where the MCU dominates and a relatively small amount of parallel processing is required, a smaller embedded FPGA (eFPGA) can be integrated with a high-performance MCU.
In many robotic applications, one of the integrated solutions is often preferred, as integrated solutions can provide higher performance levels. When a discrete FPGA is used in conjunction with a separate MCU, each device requires its own memory buffer to handle data transfers between them. If large amounts of data need to be transferred between the MCU and the FPGA, system performance will suffer. On the other hand, if the FPGA and MCU are integrated into a single chip, they can share DDR memory and data transfers do not require buffering. In this case, data transfers only involve transferring memory pointers between the MCU and the FPGA.
MCU Robot Operating System
The basic Robot Operating System (ROS) is an open source software framework for robotics application development optimized for microprocessors running operating systems such as Ubuntu Focal, macOS, and Windows 10. ROS 2 is the next generation of ROS. ROS 2 is designed with a layered architecture that separates the ROS client layer from the ROS middleware layer. The latest development in the ROS space is micro-ROS, which brings ROS 2 to mid-range and higher-level MCUs. An MCU with tens of KB of RAM is required to implement micro-ROS. Communication peripherals are also required in the MCU to support micro-ROS client-to-agent communication.
micro-ROS provides a ROS 2 development ecosystem that can run on top of real-time operating systems (RTOS), enabling them to meet the time-critical requirements of robotic system tasks that require deadlines or deterministic responses. FreeRTOS is one of the first RTOS supported by the micro-ROS project and integrated into its software stack. All implementations and tools developed by the FreeRTOS community are compatible with micro-ROS (Figure 4).
Figure 4: The micro ROS stack showing compatibility with the FreeRTOS environment. (Image: FreeRTOS)
FreeRTOS has minimal memory and processing overhead, and the RTOS kernel binary image requires only 6K to 12K bytes, making it a good fit for running micro-ROS. In addition to FreeRTOS, micro-ROS can also run with Zepher RTOS, and Zepher is supported by the micro-ROS client library and its middleware.
Summarize
Specifying an MCU for a robotics platform is a complex process. Often multiple MCUs or a single MCU with multiple cores is required, along with the possible addition of an FPGA, either as an external device or as an embedded element within the MCU. There are multiple trade-offs to be made when considering the integration of MCUs and FPGAs. For example, an MCU may be used for control functions, while an FPGA is used for more intensive AI and machine learning on a robotics platform. The release of the micro ROS robot operating system, which runs on MCUs, is another important tool available to advanced robotics platform designers.
Previous article:Liyuan Semiconductor's first 32-bit MCU product is officially released!
Next article:Arteris® IP Launches Solution to Automated Traceability of System-on-Chip Semiconductor Design
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- 【LAUNCHXL-CC2650】Pressure gasket pressure test
- Selection of diodes for analog circuits
- A Brief Analysis of High-Speed Laser Marking Control System Based on DSP
- About USB2.0 plug-in and switch
- [Atria AT32WB415 Series Bluetooth BLE 5.0 MCU] + Bluetooth communication
- xilinx vivado xdc constraint syntax
- Design and Implementation of Digital Video Conversion Interface Based on FPGA
- [AT-START-F403A Evaluation] VI. FreeRTOS system based on IAR security library (sLib) secondary development mode practice
- About the 2021 E-Sports Championship
- Classic Books on Signal Integrity Design