Abstract
In precision machining, achieving high-speed traversal while maintaining micrometer-level tracking accuracy is a significant challenge. This paper presents a data-driven framework for automatically tuning the parameters of a hierarchical control system—comprising a high-level Model Predictive Contouring Control (MPCC) and a low-level PID controller. By employing constrained Bayesian Optimization (BO), the approach optimizes global performance metrics, such as traversal time, while adhering to strict safety and precision constraints. Experimental results in a simulated industrial gantry environment demonstrate that this method significantly outperforms manual tuning, achieving a five-fold reduction in tracking error with minimal impact on productivity.
Introduction
Modern manufacturing processes, such as CNC machining and high-speed gantry systems, demand a delicate balance between productivity (speed) and quality (precision). To meet these demands, engineers often employ hierarchical control structures where a high-level planner, such as MPCC, generates optimal reference trajectories that a low-level PID controller executes.
However, the performance of these systems is highly sensitive to a large set of parameters, including cost weights, horizon lengths, and PID gains. Traditional manual tuning is not only time-consuming but often leads to sub-optimal performance, as it struggles to account for complex real-world dynamics like friction and structural vibrations. To address this, we propose an automated tuning process that leverages Bayesian Optimization to find optimal parameter configurations based on actual trajectory performance.
Methodology
Hierarchical Control Structure
The system utilizes a two-tier architecture. The high-level MPCC planner optimizes the path following by considering the system's dynamic constraints and the desired geometry. The low-level cascade PID controller then handles the motor-level execution. The goal of the tuning process is to find the parameters for this hierarchy that maximize performance across a full trajectory.
Constrained Bayesian Optimization
Rather than optimizing for local step responses, the proposed method evaluates the system based on its global performance over a complete run. The optimization problem is formulated as follows:
- Objective: Minimize the total traversal time of a given geometry.
- Constraints: Maintain the maximum contour (tracking) error and maximum jerk (to suppress vibrations) below predefined safety thresholds.
Because evaluating these parameters requires a full machine cycle, the process must be sample-efficient. We use Constrained Bayesian Optimization (BO) with Gaussian Process (GP) regression to build probabilistic surrogate models of both the objective function and the constraints. A "Constrained Expected Improvement" (CEI) acquisition function is then used to select the most promising parameters for the next iteration, balancing exploration of the parameter space with exploitation of known high-performing regions.
Experimental Results
The framework was evaluated using a simulated model of an industrial 2-axis gantry stage, tested on two distinct geometries: an octagon and a lemniscate (infinity) shape.
Performance Gains
The integration of a manually tuned MPCC planner initially improved traversal time by approximately 9x compared to a nominal controller (e.g., reducing time from 9.21s to 1.29s for the infinity shape). However, the introduction of constrained BO tuning provided the most significant precision gains. Compared to unconstrained optimization, the constrained BO approach achieved a 5-fold decrease in maximum tracking error, reaching 3.78 $\mu m$ for the infinity shape and 7.8 $\mu m$ for the octagon.
The Speed-Accuracy Trade-off
This dramatic improvement in accuracy and vibration suppression was achieved with only a marginal increase in traversal time (approximately 10%). For example, the infinity shape traversal increased from 1.11s to 1.25s when constraints were applied, which remains significantly faster than the manually tuned baseline while offering far superior precision.
Discussion and Future Work
One of the primary insights of this work is that tuning based on global trajectory performance is superior to local metric optimization for real-world machining. The sample efficiency of BO allowed the system to converge to optimal parameters within 60 to 100 iterations.
Currently, the Gaussian Process hyperparameters are fixed after an initial phase to ensure algorithmic stability. Future work will explore dynamic hyperparameter updates and the simultaneous joint-tuning of both the high-level planner and low-level controller gains. Additionally, we aim to validate this framework on physical hardware to assess its robustness against unmodeled environmental noise and mechanical wear.
Summary updated