A model predictive controller (MPC) works by planning: at every tick it solves an optimization over a short look-ahead window, called the horizon, applies only the first action, and then re-plans. Longer horizons give better control, but they make the optimization slower, and the solve has to finish before the next tick. Modern robot and edge computers are heterogeneous chips that put a CPU, an integrated GPU and a neural processing unit (NPU) on one die, all sharing one memory bus. The same chip often also runs an on-board language model. In that setting, how long the controller's solve takes depends on which engine runs each piece of the solve and on what the language model is doing at that moment. This proposal treats the controller's own computation as a second thing to plan. At each tick the system chooses the horizon length and the mapping of solver kernels to engines together. It plans these choices a few ticks ahead, using the co-located workload's predictable phases and the cost of switching mappings.
The reason to expect a payoff comes from two findings in the research file. On an Intel Core Ultra chip, the NPU cut latency by 58.54% relative to the GPU on matrix-vector products, while the GPU ran 22.6% faster than the NPU on dense 1024×1024 matrix-matrix products (Benchmarking Edge AI Platforms for High-Performance ML Inference). MPC linear-algebra kernels move from matrix-vector-like to matrix-matrix-like as the horizon and state size grow, so the best engine for a kernel depends on the horizon chosen. Separately, Agent.xpu shows that a language model's compute-heavy prefill on the NPU and its memory-bound decode on the iGPU contend for the shared memory bus. Kernel latencies on such a chip are therefore time-varying, and part of that variation can be forecast from the language model's own scheduler state.
Core Claim
A small receding-horizon planner over controller configurations, meaning pairs of horizon length and kernel-to-engine mapping, can do two things on a shared heterogeneous chip that is also running a language-model workload. First, it should lower closed-loop control cost and deadline misses compared with the best fixed configuration and with a greedy per-tick selector. Second, it should not hurt the co-located language model's latency. The new element is not putting MPC on heterogeneous hardware, which has been done statically. It is three things combined: choosing the mapping at runtime, choosing it jointly with the horizon, and planning ahead over contention forecasts and the cost of switching mappings.
Relation to Prior Work
The closest work is Nonlinear predictive control on a heterogeneous computing platform. It splits an interior-point nonlinear MPC between an ARM CPU and an FPGA in four fixed configurations and reports a 36× speedup for the configuration that places the full MINRES solver on the FPGA. That paper supplies the method we reuse: the kernel decomposition of the KKT system, which is the set of linear equations solved at each optimizer step. It also motivates the gap. Its partitions are chosen offline, its scaling stops because of CPU communication overhead, and it never faces a co-runner competing for memory.
Two other works constrain the design. Trading Off Performance for Energy in Linear Algebra Operations with Applications in Control Theory shows that splitting control-theory matrix inversion between CPU and GPU pays off mainly at large matrix sizes, and only in open loop. This warns us that for small MPC problems, the cost of moving work between engines may dominate any gain. ADHA shows that changing data layout between CPU-friendly and GPU-friendly formats has a real cost that a planner must weigh. We take its idea of an explicit remapping cost and make that cost a switching term in an online planner, where ADHA solved a one-time compile-time shortest-path problem.
On the scheduling side, three systems already plan across heterogeneous resources: Predict-and-Critic, NexusSched and HexGen-3. Predict-and-Critic applies receding-horizon optimization with a learned terminal value to cloud virtual-machine packing. NexusSched routes language-model requests using forward-looking performance models. HexGen-3 places memory-bound and compute-bound language-model stages on different GPU pools. All three schedule throughput workloads at cluster level. None schedules the computation of a hard-deadline controller, and none trades the controller's quality (its horizon length) against where its kernels run.
Two control-side works split the optimization problem itself across threads but treat the hardware as uniform. Sieber et al. run the expensive uncertainty computation of robust MPC in a slow background thread. Kang et al. split scenario trees across parallel processors.
Research Program
We build the system on an Intel Core Ultra chip with CPU, iGPU and NPU, the platform characterized in Jayanth et al..
The controller. The controller is a structured nonlinear MPC whose solve breaks into a few kernels: dynamics and Jacobian evaluation, assembly of the Riccati or KKT system, the linear solve, and the line search.
Configurations. A configuration $c=(P,m)$ consists of a horizon $P$, drawn from a small set (for example 10, 20, 40 or 80 steps), and a mapping $m$ that assigns each kernel to an engine. Each kernel also has the data layout appropriate to its engine.
Latency model. We profile solve latency for each configuration under controlled co-runner load. The co-runner is a Llama-3B or Llama-8B workload in prefill or decode, matching the Agent.xpu setup. From these profiles we fit a quantile latency model $L_q(c, w)$, where $w$ is the co-runner phase. Following Attention-based workload prediction, we use quantile regression so the planner reasons about high-percentile latencies rather than means.
Quality model. Offline, we fit the closed-loop cost $J(P)$ achieved with each horizon on each plant.
The planner. At each control tick the planner chooses configurations for the next $K$ ticks (with $K$ around 3 to 5) by solving
$$\min_{c_t,\dots,c_{t+K-1}} \sum_{k=t}^{t+K-1} \Big[ J(P_k) + s(c_{k-1},c_k) \Big] \quad \text{s.t.} \quad L_{1-\epsilon}(c_k,\hat w_k) \le \Delta,$$
where $s$ is the measured cost of switching mappings (layout remapping and warm-start transfer), $\hat w_k$ is the co-runner phase forecast from the language-model scheduler's queue, $\Delta$ is the control period, and $\epsilon$ is the allowed deadline-miss probability. The planner applies only the first configuration and re-plans at the next tick. The configuration set is small, so the search is a tiny dynamic program that runs on the CPU in microseconds.
Deadline misses. If a solve misses its deadline anyway, the controller applies the shifted tail of the previous plan, the standard MPC fallback. Every such miss is logged.
Analysis. We will characterize when joint horizon-and-mapping selection matters. Our working hypothesis is that it matters when the crossover in best engine moves inside the horizon range in use, and when co-runner phases last longer than one switching cost but are short enough that a fixed configuration is wrong part of the time.
Baselines
The naive reference point is the whole MPC solve on the CPU at the longest horizon that meets the deadline in the worst case under contention. This is the analogue of the software-only configuration in Khusainov et al..
The strongest existing method is the best static partition, chosen offline as Khusainov et al. did, but searched over our full set of configurations. We give it the same profiling budget as our planner and select it to minimize closed-loop cost under the worst-percentile contention seen in profiling. The only reported number for this family is the 36× speedup of the full-solver-on-FPGA configuration over CPU-only on a gantry crane (Khusainov et al.). That number is a speedup on a different chip with no co-runner. We found no reported result on Lacuna for closed-loop cost or deadline-miss rate of a statically partitioned MPC under shared-memory contention, so the static baseline must be re-measured here.
A strong contention-aware heuristic baseline is a greedy selector in the spirit of Agent.xpu's phase-aware routing. At each tick it picks the best-quality configuration whose predicted latency meets the deadline under the current co-runner phase.
The key ablation is our planner with a look-ahead of $K=1$ and no switching cost. Comparing it with the full planner isolates the value of planning over forecast co-runner phases. A second ablation fixes the horizon and varies only the mapping, which isolates the value of choosing horizon and mapping together.
All methods share the same plants, disturbance seeds, co-runner traces and latency profiles. Our planner beats the baselines if it lowers mean closed-loop cost and deadline misses relative to the best static partition and the greedy selector, without raising the co-runner's time-to-first-token or time-between-tokens.
Why not just…?
Why not just pick the best static partition offline? If co-runner contention were constant, a static partition would be optimal and our method would add nothing. Agent.xpu reports that prefill and decode load the shared bus very differently, which suggests the best configuration shifts over time, but the size of that shift is an empirical question. The no-co-runner and constant-co-runner conditions in our experiments are designed to show the static baseline tying. We will report that result as the boundary of where the method is useful.
Why not just use a short horizon with a learned terminal cost, so the solve is always cheap? Predict-and-Critic showed that a two-step horizon plus a learned critic beat a five-step horizon in cloud packing. This is a real threat. We include a short-horizon controller with a learned terminal cost as an additional baseline, and we also run our planner on top of it. If the short-horizon controller alone matches our planner on cost and misses, the hardware planning is unnecessary for that plant, and we will say so.
Why not just replace the solver with a neural policy that runs in microseconds? Cao et al. note that policies learned by regression do not preserve hard constraints. We will measure constraint violations of a cost-trained policy on the same plants. Our method keeps an exact solver and therefore keeps its constraint handling.
Why not just react greedily to current contention? Greedy selection ignores switching costs and cannot move to a cheaper configuration before a forecast prefill burst arrives. The $K=1$ ablation tests this directly. If it matches the full planner, the receding-horizon layer is not needed, and we would recommend the simpler greedy selector.
Proposed Experiments
Plants. We use three plants of increasing difficulty: the gantry crane from Khusainov et al., an articulated ground vehicle following Kayacan et al., and snake-robot locomotion following Yin et al.. We run each in processor-in-the-loop simulation at control periods from 5 to 20 ms.
Co-runner conditions. The co-runner workload replays agentic language-model traces in the style of Agent.xpu, mixing reactive and proactive tasks. We add synthetic phase schedules that vary burst length and burst frequency.
Metrics. We measure closed-loop tracking cost, deadline-miss rate, constraint violations, energy per control step, and the co-runner's time-to-first-token and time-between-tokens.
Decisive checks. First, we sweep co-runner burst duration relative to switching cost. Our hypothesis predicts the planner's advantage over the static and greedy baselines peaks at intermediate burst durations and vanishes at both extremes. Second, we confirm on our chip that the best engine for the linear solve changes within the horizon set, which is the crossover the Jayanth et al. BLAS results lead us to expect. If no crossover appears, horizon and mapping can be chosen separately, and the joint planning claim fails.
References
- Benchmarking Edge AI Platforms for High-Performance ML Inference
- Agent.xpu: Efficient Scheduling of Agentic LLM Workloads on Heterogeneous SoC
- Nonlinear Predictive Control on a Heterogeneous Computing Platform
- Trading Off Performance for Energy in Linear Algebra Operations with Applications in Control Theory
- Automatic data layout generation and kernel mapping for CPU+GPU architectures
- Predict-and-Critic: Accelerated End-to-End Predictive Control for Cloud Computing through Reinforcement Learning
- A Predictive and Synergistic Two-Layer Scheduling Framework for LLM Serving
- HexGen-3: A Fully Disaggregated LLM Serving Framework with Fine-Grained Heterogeneous Resource Autoscaling
- Asynchronous Computation of Tube-based Model Predictive Control
- Parallel Solution of Robust Nonlinear Model Predictive Control Problems in Batch Crystallization
- Attention-based workload prediction and dynamic resource allocation for heterogeneous computing environments
- Performance Guaranteed MPC Policy Approximation via Cost Guided Learning
- Experimental Validation of Linear and Nonlinear MPC on an Articulated Unmanned Ground Vehicle
- Automatic Snake Gait Generation Using Model Predictive Control