Regulatory considerations for MCUs in robots

Publisher:EEWorld资讯Latest update time:2021-10-29 Source: EEWORLDKeywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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).


image.png

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.


image.png

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).


image.png

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).


image.png

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.

Keywords:MCU Reference address:Regulatory considerations for MCUs in robots

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

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号