TL;DR
This paper presents a novel heterogeneous computing approach for Nonlinear Model Predictive Control (NMPC), splitting computational tasks between a CPU and an FPGA. This allows for a flexible trade-off between control performance and resource usage, achieving significant speedups and memory savings compared to purely software-based solutions.
What Problem Does This Paper Address?
Nonlinear Model Predictive Control (NMPC) is a powerful control technique that excels at handling complex nonlinear systems with constraints. However, its core relies on solving computationally intensive optimization problems at each control step. This often limits its application to systems with slow dynamics or requires expensive, high-performance computing hardware. Traditional approaches have focused on algorithmic improvements or hardware acceleration of specific parts, but integrating these into a cohesive, flexible system for NMPC has remained a challenge. Specifically, efficiently mapping the complex mathematical operations of NMPC onto heterogeneous hardware (like CPUs and FPGAs) while managing memory constraints and achieving significant performance gains is a key hurdle.
Methods
The authors propose a heterogeneous implementation of an interior-point-based NMPC algorithm. The core idea is to leverage the strengths of both a general-purpose CPU and a Field-Programmable Gate Array (FPGA). The workload is strategically divided between these two components. A key innovation is a new method for exploiting the structure of the Karush-Kuhn-Tucker (KKT) matrix, which is central to interior-point methods. This structural exploitation leads to significant memory savings, a critical factor for resource-constrained FPGAs.
The paper details four specific ways of splitting the workload:
- SW: Entire algorithm on the CPU (ARM Cortex-A9).
- HG1: Matrix-vector multiplication accelerated on FPGA, rest on CPU.
- HG2: The entire Lanczos kernel (part of the MINRES solver) on FPGA, rest on CPU.
- HG3: The complete linear system solver (MINRES) on FPGA, rest on CPU.
The implementation also introduces a new release of their "Protoip" software tool, which simplifies the process of prototyping and verifying heterogeneous NMPC implementations, including processor-in-the-loop (PIL) testing.
Datasets
Not discussed in the paper. The paper uses a gantry crane model for experimental validation.
Key Insights and Ideas
- Flexible Workload Splitting is Key: The ability to dynamically partition the NMPC algorithm between CPU and FPGA is crucial for achieving Pareto-optimal designs, balancing performance and resource usage. Simply accelerating the most computationally intensive part (like matrix-vector multiplication) doesn't always yield the best results if other parts become the bottleneck.
- KKT Matrix Structure for Memory Savings: Exploiting the specific structure of the KKT matrix in interior-point methods is a highly effective strategy for reducing memory footprint on FPGAs, which is often a limiting factor.
- MINRES Solver on FPGA: Accelerating the MINRES linear solver on the FPGA offers a good balance between computational complexity and hardware implementation feasibility, as it primarily relies on matrix-vector multiplications.
- Protoip as a Prototyping Enabler: The updated Protoip tool significantly lowers the barrier to entry for developing and testing heterogeneous NMPC systems, abstracting away low-level hardware details and enabling efficient PIL verification.
Key Results
- Significant Memory Savings: The proposed approach achieved an 18x memory saving compared to existing methods for storing the KKT matrix.
- Substantial Speedup: A 36x speedup was reported for the heterogeneous implementation (specifically HG3) over a purely software implementation running on an ARM Cortex-A9 processor.
- Trade-off Achieved: Figure 11 clearly demonstrates the trade-off between execution time and FPGA resource usage. Increasing parallelism (P) for matrix-vector multiplication on the FPGA did not always lead to speedups, highlighting that the overall algorithm structure and the CPU's role are critical.
- Gantry Crane Validation: The controller was successfully validated in a closed-loop simulation with a gantry crane model, demonstrating its practical applicability.
Limitations and Future Work
- Control Logic Overhead: The implementation requires control logic that might limit the FPGA's clock frequency. However, the authors note that matrix-vector multiplication is often not the primary bottleneck in larger algorithms.
- Preconditioner Complexity: Applying a preconditioner directly can destroy in-block sparsity, negating memory savings. While a sparsity-preserving prescaler was used, it slightly complicates the algorithm by converting negative identity matrices into general diagonal matrices.
- Automating Design Process: Future work will focus on automating the design process by formulating the NMPC design problem as a multi-objective optimization problem. This would allow for systematic identification of optimal trade-offs between hardware parameters (like parallelism) and software parameters (like horizon length).
Summary updated