TL;DR
This paper tackles the challenge of running complex real-time optimal control algorithms, like Model Predictive Control (MPC), on power-constrained embedded systems. By exploring various hardware architectures (CPUs, vector processors, accelerators) and optimizing software, they achieve significant speedups and power reductions for robotic control, paving the way for more capable and efficient robots.
What Problem Does This Paper Address?
Modern robots are becoming increasingly sophisticated, relying on complex algorithms for tasks like navigation, manipulation, and control. Model Predictive Control (MPC) is a powerful technique for achieving precise and responsive robot behavior, especially in dynamic scenarios. However, MPC's computational demands grow rapidly with the robot's complexity, making it a significant challenge to run in real-time on embedded System-on-Chips (SoCs) that have strict limitations on power, area, and latency. Traditional embedded processors often lack the necessary performance, while high-performance solutions consume too much power for battery-operated robots. This paper aims to bridge this gap by systematically evaluating and optimizing different hardware architectures for these demanding robotic control workloads.
Methods
The authors conducted a comprehensive design space exploration, profiling and optimizing representative architectural designs. Their approach involved:
- Architectural Profiling: Evaluating general-purpose CPUs (including in-order and out-of-order RISC-V cores), vector machines (specifically the RISC-V vector extension, RVV), and domain-specific accelerators (like systolic arrays).
- Software Optimization: Developing optimized software mappings for these architectures. This included:
- Library-based approach: Using a custom matrix library (
matlib) for common operations. - Hardware-specific optimizations: Techniques like loop unrolling, operator fusion, and static scheduling tailored to the strengths of each architecture.
- Code Generation: Proposing a flow to automate the mapping of robotic workloads to specialized architectures, reducing engineering effort.
- Hardware-in-the-Loop (HIL) Evaluation: Testing their optimized solutions on a fabricated RISC-V multi-core vector SoC controlling a simulated drone, providing a realistic assessment of performance and power consumption in a real-world scenario.
Datasets
The paper does not explicitly mention training datasets. For evaluation, they used:
- TinyMPC: A state-of-the-art embedded MPC algorithm, serving as the primary robotic workload.
- Simulated Drone Scenarios: Three difficulty levels (easy, medium, hard) of waypoint tracking tasks for a simulated CrazyFlie drone, used in the HIL evaluation.
Key Insights and Ideas
- Architectural Mismatch: Standard hardware schedulers (like those in vector cores or systolic arrays) often don't align well with the specific computational patterns of real-time robotic control algorithms, leading to suboptimal performance.
- Software is King (for these workloads): Significant performance gains (up to 3.71x speedups) were achieved through careful software scheduling and system optimizations, often outperforming raw hardware capabilities.
- Vector Extensions Shine: RISC-V vector extensions, when properly optimized, offer a compelling balance of performance and efficiency for many robotic control tasks, outperforming scalar CPUs and showing promise against specialized accelerators for these specific workloads.
- Systolic Arrays are Niche: While powerful for specific matrix-heavy tasks (like those in deep learning), systolic arrays showed less versatility and often struggled with the varied, smaller tensor operations common in MPC.
- Hardware-in-the-Loop is Crucial: Real-world HIL testing revealed that optimized vector implementations can significantly reduce system power consumption (up to 27%) and improve robustness to disturbances, enabling more efficient and reliable robotic systems.
- Automation is Key: The engineering overhead of hand-optimizing for diverse hardware is a major bottleneck. The proposed code generation flow is a critical step towards making optimized robotic control more accessible.
Key Results
- Speedup: Achieved up to 3.71x speedups for MPC algorithms through targeted architectural modifications and deep software optimizations.
- Power Reduction: Demonstrated up to 27% system-level power reductions in robotic tasks.
- HIL Performance: Optimized vector implementations enabled a simulated drone to complete tasks at lower clock frequencies and with significantly less power compared to scalar implementations.
- Robustness: Vectorized MPC showed improved disturbance rejection, enduring larger forces and torques and achieving faster recovery times.
- Resource Liberation: Accelerating MPC tasks with vectorization freed up CPU resources, improving the performance of other concurrent tasks (like perception) by up to 1.35x.
Limitations and Future Work
- Hardware Scheduler Mismatch: The paper highlights that current hardware schedulers are not ideal for robotic control workloads, suggesting future work in designing more suitable schedulers.
- Engineering Overhead: Hand-optimizing software for specialized hardware is time-consuming. The authors propose automated code generation and explore library-based approaches as solutions.
- Systolic Array Versatility: While efficient for specific tasks, systolic arrays were found to be less versatile for the varied operations in MPC. Future work could explore more flexible systolic array designs or hybrid approaches.
- Future Work: The authors suggest exploring representations that directly express robotic workloads as computation graphs for better compilation, and developing strategies for scheduling robotic applications on heterogeneous embedded SoCs. They also plan to investigate further optimizations for Gemmini and explore different mesh dimensions and scratchpad capacities.
Summary updated