← Back to Design Patterns
Robotics Mixed Evidence ManufacturingAutonomous VehiclesMechatronics
MPCCContouring ControlPath FollowingAutonomous RacingCNC Optimization

Path Following & Contouring MPCC — Speed-Accuracy Trade-offs via Predictive Control

Why This Matters (Executive Summary)

  • Any operation requiring “follow this path as fast and accurately as possible while respecting limits” — CNC machining, AGV navigation, robotic milling, drone inspection — maps directly to the Model Predictive Contouring Control (MPCC) pattern.
  • MPCC explicitly separates contour error (deviation from the path) from lag error (progress along the path), enabling principled speed-accuracy trade-offs that classical tracking controllers cannot achieve.
  • Published results include time-optimal drone racing laps faster than a world-class human pilot, 10% lap-time reductions on a full-size autonomous race car through learned model corrections, and a 65% lower maximum contour error than computed-torque control on a 2-DoF manipulator.
  • For DACH manufacturers and integrators, this pattern unlocks higher throughput without sacrificing precision on existing motion platforms.

The Design Pattern Explained

Classical path-tracking controllers follow a time-parameterized reference trajectory: the system must be at position X at time T. If the system falls behind, the reference keeps moving, leading to growing tracking errors. MPCC reformulates this problem: instead of tracking a time-stamped reference, the controller optimizes over a virtual path parameter that determines how far along the path the system has progressed.

This yields two independent error components: the contour error (perpendicular distance from the path) and the lag error (distance along the path from the desired progress). The optimizer balances these against each other through cost weights, so operators can tune the trade-off between “stay precisely on the path” and “move as fast as possible.”

Why MPC over alternatives? Feed-rate scheduling or gain-scheduled PID can approximate this trade-off, but they cannot simultaneously optimize speed, accuracy, and constraint satisfaction (torque limits, obstacle clearances, jerk bounds) in a single formulation. MPCC handles all of these jointly.

The architecture follows a standard pipeline: path representation (splines, waypoints, or learned curves), state estimation (encoders, vision, IMU fusion), MPCC optimization (nonlinear program solved at each control step), and actuation with constraint enforcement.

Linear MPC vs. NMPC in path-following and contouring control: The MPCC cost function formulation (contour error + lag error + constraints) is independent of whether the underlying dynamics are linear or nonlinear — both cases can use the contouring objective. Nonlinear MPCC (NMPC) is used when the vehicle or robot dynamics are inherently nonlinear: drone racing with full quadrotor dynamics and per-rotor thrust constraints (Application 1), cleaning robot with nonlinear kinematic coupling (Application 3), learning-based GP-augmented contouring on a full-size autonomous race car operating at 2 g lateral acceleration (Application 4), learning-based NMPC for outdoor mobile robots on uneven terrain (Application 6), and the Formula Student AMZ full-stack autonomous system (Application 7). These solve non-convex NLPs at each step via RTI or SQP solvers. Linear MPC appears in two applications: contour error synchronization MPC (CES-MPC) on a 2-DoF manipulator (Application 2) uses linearized joint-space dynamics → convex QP at 500 Hz (2 ms sampling), achieving 65% better contour accuracy than computed-torque control without nonlinear solver overhead. Deflection compensation in cooperative robotic milling (Application 5) uses linear structural compliance models in a predictive framework — technically a linear MPC rather than a full MPCC formulation, included here because it addresses the same path-accuracy objective in a manufacturing context. For DACH deployments: if the platform operates near a linearizable regime (manipulator at moderate speeds, AGV below tire saturation), linear contouring MPC delivers most of the benefit at a fraction of the implementation complexity; NMPC is warranted when operating at dynamic limits or in strongly nonlinear regimes.

Applications & Reference Implementations

Time-Optimal Drone Racing via MPCC — Aerial Robotics

Romero et al. at the University of Zurich applied MPCC to quadrotor drone racing, solving the time-allocation problem online with full quadrotor dynamics and per-rotor thrust constraints. The controller does not require a time-parameterized reference — it decides autonomously how fast to progress along the race track. In real-flight experiments, the MPCC controller achieved faster lap times than both a standard MPC tracking controller and a world-class professional human pilot, demonstrating the power of treating progress speed as an optimization variable. 1

Contour Error Synchronization MPC on a 2-DoF Manipulator — Precision Robotics

A dual-mode contour error synchronization MPC (CES-MPC) was evaluated against standard MPC and computed-torque control (CTC) on a 2-DoF robotic manipulator at a 2 ms sampling period. Under initial error conditions, CES-MPC achieved a maximum contour error of 7.4 mm, compared to 14.6 mm for standard MPC and 21.1 mm for CTC — a 49% improvement over MPC and 65% over CTC. This demonstrates that explicitly penalizing contour error, rather than pointwise tracking error, yields substantially better path-following accuracy for manipulator applications. 2

Outdoor Cleaning Robot MPCC Retrofit — Mobile Robotics

A manual outdoor sweeper was retrofitted into an autonomous cleaning robot using MPCC for path tracking. The contouring formulation allowed the controller to balance trajectory accuracy against cleaning coverage speed through tunable cost weights. Simulation and experimental results validated improved path-tracking performance on the retrofitted platform, showing that MPCC is applicable not only to high-performance racing but also to pragmatic industrial mobile robots where coverage efficiency matters as much as precision. 3

Learning-Based MPC for Autonomous Racing — High-Performance Vehicles

Kabzan et al. at ETH Zurich combined a contouring MPC formulation with Gaussian-process learning of model residuals on a full-size autonomous race car. Operating at 15 m/s with lateral accelerations up to 2 g, the learning-based approach reduced lap times by approximately 10% compared to the nominal model. A dictionary-style data management approach enabled continual model updates during operation. This result demonstrates that combining MPCC with online learning closes the gap between model-based and data-driven approaches at the performance limits. 4

Learning-Based NMPC for Vision-Based Mobile Robot Path Tracking — Field Robotics

Ostafew et al. evaluated learning-based NMPC for vision-based path tracking on two mobile robot platforms (50 kg and 160 kg) over more than 1.8 km of travel at speeds from 0.35 to 1.0 m/s. The learning component compensated for model mismatch and changing terrain conditions, improving long-range tracking robustness. This validates the MPCC/learning pattern for outdoor AGVs and inspection robots operating in environments where terrain and lighting vary unpredictably. 5

Formula Student Driverless Racing Stack — Autonomous Vehicles

The AMZ Driverless team at ETH Zurich developed a complete autonomous racing system integrating perception, planning, and constraint-aware control, with documented competition results at Formula Student Driverless events. The system demonstrates that optimization-based path following under traction and track constraints scales from research prototypes to competition-proven platforms, providing a blueprint for industrial autonomous vehicle deployments. 6

Precision CNC Machining via Predictive Contouring Control — Manufacturing

Model predictive contouring control has been validated experimentally on multi-axis CNC machining centers. Kang et al. (2022) designed a real-time three-axis MPC controller where contour error is treated as an explicit constraint in the receding-horizon optimization — rather than an indirect consequence of per-axis tracking. The approach handles cross-axis coupling and is compatible with both biaxial and three-axis machine tool architectures. The same MPC contouring principle underpins the foundational “Discrete-time model predictive contouring control for biaxial feed drive systems and experimental verification” (El Khalick & Uchiyama, Mechatronics, 2011), which reported hardware-validated contour error reduction on a two-axis servo test rig. This makes MPC contouring the systematic path from single-axis servo control to coordinated multi-axis contouring accuracy — applicable to high-precision milling, grinding, and EDM operations where feed-rate maximization and surface-quality compliance conflict. 7

What This Means for Your Operations

The MPCC pattern is transferable to any DACH operation where path-following speed and accuracy are both important:

  • CNC and robotic machining: feed-rate optimization along tool paths, reducing cycle time while maintaining surface quality.
  • AGV and AMR navigation: faster warehouse traversals with tighter path adherence, especially around corners and narrow aisles.
  • Inspection and cleaning: coverage speed optimization on predefined routes.

Prerequisites: a kinematic or dynamic model of the platform, encoder/sensor feedback for state estimation, and a path representation (waypoints or splines). Most existing motion platforms already provide these.

The first step

A fixed-price remote diagnosis: EUR 4,500 net, 5 working days, remote, with a one-page summary for management, a technical report and a results meeting. Before that, a free 30-minute call. Available by arrangement, freelance or through temporary agency work. The remote diagnosis in detail

Typical KPIs to Track

  • Contour error (perpendicular deviation from path) — primary quality metric
  • Lag error (progress delay) — throughput metric
  • Cycle time or lap time — overall efficiency
  • Constraint violation rate (torque, jerk, clearance) — safety and mechanical health
  • Surface quality or coverage uniformity — application-specific outcome

Risks & Prerequisites

  • MPCC requires a smooth, differentiable path representation (splines preferred over raw waypoints); path preprocessing may be needed.
  • The speed-accuracy trade-off is governed by cost weights that need tuning per application — this is simpler than PID tuning but requires understanding of the contour/lag decomposition.
  • For learning-based extensions, sufficient operational data (laps, runs, missions) must be collected before the learning component provides meaningful corrections.
  • Real-time solve times depend on the path complexity and prediction horizon; profiling on the target hardware is essential.

FAQ

Q: How is MPCC different from standard trajectory tracking MPC? A: Standard MPC tracks a time-parameterized reference — if the system slows down, the reference runs ahead. MPCC decouples progress from time, so the controller can slow down on difficult sections and speed up on easy ones, optimizing the trade-off automatically.

Q: Can MPCC be applied to existing CNC or robot controllers? A: Yes, typically as an outer-loop feed-rate optimizer or reference generator. The existing low-level servo loops handle motor commutation; MPCC provides the reference trajectory and feed-rate commands.

Q: What if my path has sharp corners or discontinuities? A: MPCC works best with smooth paths. Sharp corners can be handled by adding corner-rounding splines or by switching to a waypoint-tracking mode locally. This is a standard preprocessing step.

Q: Is this only for high-speed applications like racing? A: Not at all. The same formulation applies to slow, precision applications (robotic milling at mm-level accuracy) and moderate-speed logistics (AGVs at 1-2 m/s). The speed-accuracy trade-off is application-specific.

Book a free 30-minute call

Ready to explore whether MPCC fits your path-following challenge?

Dr. Rafał Noga — AI, control and optimisation for plants and machines

Email me | noga.es

Fixed-price remote diagnosis · non-disclosure agreement before any data exchange · availability on request

Public References

Footnotes

  1. Romero, Sun, Foehn, Scaramuzza, “Model Predictive Contouring Control for Time-Optimal Quadrotor Flight”, IEEE Transactions on Robotics 38(6):3340–3356, 2022. DOI · PDF ↩

  2. “Dual-Mode Synchronization Predictive Control of Robotic Manipulator”, Journal of Dynamic Systems, Measurement, and Control 144(11), 2022. DOI · arXiv ↩

  3. Duc, Souma, Yamaguchi, Uchiyama, “Model Predictive Contouring Control for Path Tracking of a Retrofitted Outdoor Cleaning Robot”, International Journal of Automation Technology 19(6):1086–1094, 2025. DOI ↩

  4. Kabzan, Hewing, Liniger, Zeilinger, “Learning-Based Model Predictive Control for Autonomous Racing”, IEEE Robotics and Automation Letters, 2019. DOI ↩

  5. Ostafew, Schoellig, Barfoot, “Learning-based nonlinear model predictive control to improve vision-based mobile robot path-tracking in challenging outdoor environments”, IEEE ICRA, 2014. DOI ↩

  6. Kabzan, de la Iglesia Valls, Reijgwart, Hendrikx, Ehmke, Prajapat et al., “AMZ Driverless: The full autonomous racing system”, Journal of Field Robotics, 2020. DOI · arXiv ↩

  7. Kang, Zhao, Li, Liu, “Design of a real-time three-axis controller for contour error reduction based on model predictive control”, Proceedings of the IMechE, Part C 236(16):9241–9254, 2022. DOI · Foundations: Lam, Manzie, Good, “Model predictive contouring control”, IEEE CDC, 2010 (DOI); El Khalick, Uchiyama, “Discrete-time model predictive contouring control for biaxial feed drive systems and experimental verification”, Mechatronics, 2011 (DOI). ↩

📅 Book a free 30-minute call

Where this pattern shows up in industry

2 problems · 2 industries

Problems that operators, machine builders and utilities describe, where this pattern is part of the answer. Each one explains what happens, what it costs, why the usual fix fails and how a fixed-price remote diagnosis checks it.

Manufacturing & CNC 1 problem
Robotics & Autonomous Systems 1 problem

Was this article helpful?

Share: LinkedIn

Contact

Send a message

I reply within 24 hours.  ·  NDA signed on request · No spam · GDPR-compliant

Your data is processed by FormSubmit.co and used solely to respond to your inquiry. No marketing without consent.

Direct contact

Dr. Rafał Noga

Meeting

Book a free 30-minute call directly via Calendly.

Book a free 30-minute call

Stay Updated

Get insights on Industrial AI, APC, and process optimization delivered to your inbox.