Adaptive Mesh Refinement (AMR) is a cornerstone computational technique for solving optimal control problems that demand high accuracy without prohibitive computational cost. By dynamically concentrating grid points where the solution exhibits rapid changes, discontinuities, or high gradients, AMR enables engineers and mathematicians to obtain reliable, high-fidelity control trajectories while keeping the overall mesh size manageable. This article explores how AMR enhances solution accuracy in optimal control, the underlying mechanisms, practical benefits, implementation challenges, and emerging trends.

What Is Adaptive Mesh Refinement?

At its core, adaptive mesh refinement is a strategy for varying the resolution of a computational grid across the problem domain. Instead of using a uniformly fine mesh everywhere, AMR starts with a coarse global mesh and automatically refines regions where the solution error is estimated to be large. The refinement process is iterative: after computing an initial solution on the coarse mesh, an error indicator identifies cells or elements that require splitting (h-refinement), increasing polynomial order (p-refinement), or both (hp-refinement). The mesh is adapted, and the solution is recomputed on the new grid. This cycle repeats until the error meets a predefined tolerance or the computational budget is exhausted.

Three primary forms of AMR appear in optimal control:

  • h-refinement – subdividing mesh elements into smaller ones to capture local detail.
  • p-refinement – increasing the polynomial degree of shape functions within an element.
  • r-refinement – moving mesh nodes to redistribute resolution without changing element count (also called mesh movement).

hp-adaptivity combines both h- and p-refinement, often delivering exponential convergence for smooth problems. The choice of technique depends on the problem structure, available software, and desired convergence rate.

Why Accuracy Matters in Optimal Control

Optimal control problems involve finding a control law that minimizes a performance index while satisfying dynamic constraints. The solution is typically obtained by discretizing the continuous problem — for example, via direct collocation, multiple shooting, or pseudospectral methods. Discretization introduces several sources of numerical error:

  • Truncation error from replacing derivatives with finite differences or polynomial approximations.
  • Integration error in evaluating cost functionals and constraints.
  • Interpolation error when mapping between control and state discretization.

These errors propagate into the computed control trajectory. In safety-critical applications such as aerospace guidance, autonomous vehicle navigation, or chemical process control, even small inaccuracies can lead to suboptimal performance, constraint violations, or instability. AMR directly addresses these issues by allocating resolution where errors are largest, thereby reducing the overall discretization error without uniformly increasing mesh size.

How AMR Works in Practice

Error Estimation

The success of AMR hinges on reliable error indicators. Two common approaches are:

  • Residual-based indicators – compute the norm of the residual of the discretized optimality conditions within each element. High residuals signal areas needing refinement.
  • Adjoint-based (goal-oriented) indicators – estimate the contribution of each element to the error in a quantity of interest (e.g., the terminal cost). These are more expensive but yield problem-specific refinement.

In optimal control, the solution often contains boundary layers, switches (bang-bang controls), or singular arcs. Adjoint-based indicators are particularly powerful because they identify regions where errors most affect the cost function.

Refinement Criteria and Algorithms

Once error indicators are computed, a criterion decides which elements to refine. Common strategies include:

  • Refining a fixed fraction (e.g., 20%) of elements with the largest error.
  • Refining all elements whose error exceeds a threshold (e.g., 5% of the maximum error).
  • Using a fixed number of refinement levels (e.g., 3 levels of h-refinement).

The mesh adaptation algorithm must also maintain mesh quality, avoid hanging nodes (unless using a method that supports them), and ensure consistent discretization of state and control. Many modern libraries, such as deal.II and PETSc, provide built-in AMR routines for finite element and finite volume methods.

Integration with Optimal Control Solvers

AMR is typically embedded within an iterative solution loop for optimal control:

  1. Discretize the optimal control problem on an initial coarse mesh.
  2. Solve the discretized nonlinear programming (NLP) problem (e.g., using IPOPT or SNOPT).
  3. Evaluate error indicators based on the current solution.
  4. If the error exceeds a tolerance, refine the mesh and return to step 2.
  5. Output the solution on the final adapted mesh.

This loop is sometimes called a “mesh refinement trajectory” in direct transcription methods. The re-solve on each new mesh can be warm-started from the previous solution, speeding convergence.

Benefits of AMR in Optimal Control

  • Enhanced accuracy with minimal computational overhead – By concentrating points where they matter, AMR reduces discretization error by orders of magnitude compared to a coarse uniform mesh, while using far fewer degrees of freedom than a uniformly fine mesh.
  • Efficient treatment of discontinuities and sharp gradients – Optimal controls often have jumps (bang-bang arcs) or saturations. Uniform meshes smear these features; AMR resolves them by inserting many small elements around the discontinuity, preserving the control shape.
  • Better satisfaction of path constraints – State and control constraints are easier to enforce when the mesh accurately represents the constraint boundary. AMR aligns grid cells with active constraint surfaces.
  • Scalability to large-scale problems – For high-dimensional optimal control (e.g., in PDE-constrained optimization), a uniform mesh would be infeasible. AMR keeps the problem tractable by focusing resources.
  • Adaptability to dynamic features – In time-dependent optimal control (moving horizon estimation, receding horizon control), AMR can be recomputed at each step to track moving fronts or switching times.

Implementation Challenges

Despite its power, AMR introduces significant complexity into optimal control solvers.

Design of Reliable Error Indicators

A poor error indicator may over-refine smooth regions and under-refine critical ones, wasting resources or degrading accuracy. For optimal control, the error indicator must be sensitive to both state and control errors, as well as to the cost functional. Adjoint-based indicators are more accurate but require solving an additional adjoint problem, doubling the computational effort per refinement cycle.

Dynamic Mesh Data Structures

Managing a changing mesh requires careful programming. Elements are split, merged (coarsening), or moved. Connectivity must be updated, and solution fields must be interpolated from the old mesh to the new one. Interpolation introduces projection errors that must be accounted for. Many libraries handle this internally, but tight integration with a custom optimal control solver can be challenging.

Stability of the Optimization Process

Snapping or abrupt changes in mesh topology can cause the NLP to become ill-conditioned or converge slowly. Multigrid-like preconditioning or continuation strategies are often needed. Additionally, the refined mesh may introduce high-frequency modes that require robust line searches or trust-region methods.

Parallelization and Load Balancing

AMR naturally creates an unbalanced workload because refined regions have many small elements while coarse regions have few large ones. Efficient parallel AMR requires dynamic load balancing, which adds communication overhead. For large-scale optimal control (e.g., in computational fluid dynamics with control), this is a major research area.

Applications in Optimal Control

AMR has been successfully applied across many domains of optimal control:

  • Aerospace vehicle guidance – Reentry trajectory optimization, rocket landing, and ascent trajectories often include sharp atmospheric transitions and control saturation. AMR captures the thin boundary layer at atmospheric entry, producing feasible, fuel-efficient trajectories (example).
  • Autonomous and robotic systems – Motion planning with obstacle avoidance benefits from AMR around obstacles and near singularities in the configuration space. Real-time implementations use simplified h-refinement on a coarse background grid.
  • Chemical process control – Batch reactors and distillation columns exhibit stiff dynamics and switching policies. AMR helps maintain accuracy across slow and fast regimes.
  • Optimal control of partial differential equations – When the dynamics are governed by PDEs (e.g., heat conduction, fluid flow), the control is distributed or on the boundary. AMR in both space and time (spacetime adaptivity) keeps the computational cost manageable (Wikipedia).
  • Biomedical engineering – Optimal drug delivery and cancer therapy scheduling involve multi-scale dynamics. AMR tailors resolution to the drug distribution profile.

Future Directions

Several trends promise to make AMR even more effective for optimal control:

  • Machine learning–assisted error estimation – Neural networks can learn to predict local error from solution features, reducing the cost of adjoint solves. Early work shows promising results, especially for repetitive structures in control problems.
  • hp-adaptivity with automatic p-selection – Algorithms that simultaneously choose element size and polynomial order can achieve exponential convergence. Research continues into robust strategies for optimal control.
  • Time-adaptive mesh refinement – Many optimal control problems are solved with a fixed time grid. Coupling temporal AMR with spatial AMR allows capturing switching times and boundary layers in time as well as space.
  • Uncertainty quantification and robust control – AMR techniques are being extended to handle stochastic optimal control by refining in uncertain regions of the probability space, enabling robust solutions under parameter uncertainty.

A thorough introduction to AMR in the context of finite element methods is available from this classic paper by Bangerth and Rannacher.

Conclusion

Adaptive mesh refinement is a fundamental tool for achieving high accuracy in optimal control solutions without incurring the full cost of a uniform fine mesh. By dynamically focusing computational resources on areas with large error, AMR enables the resolution of discontinuities, boundary layers, and active constraints that would otherwise degrade solution quality. While implementation challenges remain — particularly in error indicator design, data structure management, and parallel load balancing — the payoff in terms of accuracy and efficiency is substantial. As AMR methods continue to mature, they will play an increasingly central role in solving the complex, large-scale optimal control problems that arise in modern engineering and science.