# Beyond Terminal Constraints: Reliable Robot Control with Learned Safe Sets

Safe sets on early horizon nodes can replace terminal control-invariant constraints

Gianni Lunardi, Elias Fontanari, Matteo Saveriano, Andrea Del Prete · arXiv · 2026-11-4

- **Problem** Exact control-invariant safe sets are intractable for nonlinear robots, and approximate sets lose the guarantee of recursive feasibility.
- **Method** RC-MPC places a hard constraint on a horizon node instead of the terminal state, then shifts it toward step 0.
- **Results** In simulations on a 6-joint robot manipulator, RC-MPC showed fewer constraint violations than state-of-the-art methods while keeping comparable tracking performance.

## Why terminal safe sets fall short

MPC is attractive for robot safety because it writes constraints directly into the optimization problem. The hard part is recursive feasibility, meaning the optimization stays solvable at every iteration once it is solvable at the start. Trivial control-invariant sets, such as the equilibria of the system, are known but small, so they make the robot move slowly.

The usual remedy is to force the final state of the horizon into a control-invariant set, which guarantees recursive feasibility. Computing such a set exactly is generally intractable for nonlinear systems, so numerical methods must approximate it. An approximate set is generally not control invariant, so adopting it as the terminal set no longer guarantees feasibility.

Softening the terminal constraint with a heavily penalized slack keeps the solver running. The softening lets the state leave the set, so this approach guarantees neither safety nor recursive feasibility. The paper starts from this gap and asks whether safety can rely on weaker conditions than control invariance.

## Moving the constraint along the horizon

The core idea is that the state doesn't have to sit in the safe set at the end of the horizon. If one node x\_r of the prediction lies in the safe set, the current state is safe, because it can reach x\_r through the predicted trajectory. RC-MPC uses this fact by tracking the node r with a hard constraint, so the constraint can shift toward step 0 over iterations.

At each iteration the controller checks whether a state x\_r with 1 ≤ r ≤ N lies in S, and this check drives the constraint's position.

Once the receding constraint reaches step 0, RC-MPC can no longer rely on it, so it adds a soft constraint on the terminal state. The soft terminal constraint pushes x\_N back toward S, which keeps the problem solvable while the hard constraint is absent. The OCP therefore keeps a hard constraint on x\_r and a soft one on x\_N, with the slack s penalized by an L1 term with weight w\_s.

The slack is applied as the Minkowski sum S ⊕ sB, where B is the unit ball.

After each solve, RC-MPC verifies whether the terminal state x\_{N\|k-1} lies in S. If it does, the receding constraint moves to x\_{N-1\|k}, which guarantees safety for N-1 more iterations. Figure 2 shows an example with N = 3 and a 3-step CIS, where the constraint shifts forward to time step 2 at iteration 3. At that iteration x\_{3\|0} ∈ S implies that the state can return to S in 3 steps, so the soft terminal constraint is feasible.

![Figure 2: Example of RC-MPC withN= 3and a 3-step CIS. At MPC iteration 3, the conditionx 3\|0 ∈ Simplies, from(7), that the state can return toSin 3 steps. The…](https://refivu.com/papers/0a0f5b84-ffd8-4183-98ce-8b6661b987ad/figures/figure-8e5b94e640ef51adb03a126234d7a53b.png?thumb=512)

**Figure 2** .Example of RC-MPC withN= 3and a 3-step CIS. At MPC iteration 3, the conditionx 3\|0 ∈ Simplies, from(7), that the state can return toSin 3 steps. The soft terminal constraint x3\|3 ∈ Sis therefore feasible and can be satisfied. Consequently, the receding constraint shifts forward to time step 2.

[Original paper](https://arxiv.org/abs/2611.06196v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Gianni Lunardi, Elias Fontanari, Matteo Saveriano, Andrea Del Prete · Beyond Terminal Constraints: Reliable Robot Control with Learned Safe Sets · Original paper figure · Extracted the figure area from page 5 of the original PDF.

Algorithm 1 implements this with a search over j \> r, and the constraint is moved to j-1 when a state x\*\_j lies in S. The last optimal solution is shifted by one step and used as the warm start for the next iteration. The theory behind this uses Definition 3, a K-step control invariant set, where the state must reach S in exactly K steps.

The authors note that this definition differs from the one in Zhao et al. (2024).

## Multi-step safe-set classes and their guarantees

The authors define K-step control invariance as a set from which the set can be reached in exactly K steps. Setting K = 1 recovers the usual control-invariance definition, so this class contains the classical one. Up-to-N-step invariance requires one fixed K between 1 and N that works for the whole set. Within-N-step invariance is looser, because each state can leave the set and return in a different number of steps up to N.

Any up-to-N-step CIS is also a within-N-step CIS, so the first class sits inside the second.

Theorem 1 states that if the safe set is up-to-N-step control invariant and the soft terminal penalty exceeds the optimal Lagrange multiplier, RC-MPC is recursively feasible. The proof waits for the receding constraint to reach node N minus K, where the K-step property makes the soft terminal constraint feasible. Once the soft terminal constraint is exactly satisfied, the hard receding constraint moves to step N minus 1, giving RF for N minus 1 more iterations.

The authors note that this needs only up-to-N-step invariance, which is weaker than full control invariance.

HTC-MPC uses the back-and-forth-N-step condition, which requires some k between 0 and N minus 1 with B\_k(S) contained in B\_N(S). Under this condition the authors prove safety, not recursive feasibility, even though the terminal set need not be control invariant. The proof lets the last feasible solution drive the system while the OCP stays infeasible, until the terminal constraint becomes feasible.

The cost of this result is that the system may run in open loop for up to N steps while the problem is infeasible.

For PC-MPC the authors prove recursive feasibility under the back-and-forth-within-N-step condition, which is weaker than what RC-MPC needs. The paper also corrects an earlier RC-MPC proof that used within-N-step invariance. That earlier proof had assumed the receding state stays the same across iterations, which doesn't hold in general.

## Safe abort when feasibility is lost

Safe abort is a fallback that stops the task and drives the robot to an equilibrium state. The trigger is the receding constraint reaching a trigger node L, which the paper implements for RC-MPC and PC-MPC. Trigger time L is a parameter of Algorithm 4, so the abort starts before the receding constraint can reach node 0.

The abort problem needs time to solve, and at node L the controller has only L + 1 time steps left. Letting the receding constraint reach node 0 would require solving the safe abort OCP in zero time, which is impossible. To keep recursive feasibility while still allowing time, the authors stop the receding constraint at L instead.

Once the receding constraint reaches L, the controller starts the abort OCP from the predicted state x\*\_{L+1\|t}. In parallel, the normal RC-MPC keeps trying to solve from the current state. If that solution meets the terminal constraint, normal operation resumes with the receding constraint set to N-1. Otherwise the system follows the computed solution until x\*\_{r\|t}, then follows the abort trajectory to an equilibrium.

For PC-MPC, the controller stops using new trajectories and keeps the last solution computed when r = L + 1.

The abort OCP is solved with the Real-Time Iteration scheme, so it is solved within one time step. Pre-computing a warm start from the predicted trajectory was the first option, but it may prove insufficient. Pinning the predicted state to the trigger state was tested in simulation and performed poorly, so the authors didn't adopt it. With Real-Time Iteration, the abort OCP swaps with the MPC problem, so Assumption 2 isn't needed.

## Building the safe set from VBOC samples

VBOC maximizes the velocity norm of the initial state, with the configuration fixed and the velocity direction chosen at random. The OCP keeps the initial configuration at q\_init and draws the direction d uniformly at random in joint space. Because uniform sampling of q\_init and d covers the joint angles and joint velocity directions, the resulting samples spread across the input space of the set representation.

The constraint Hx\_0 = h ensures that the optimal first state lies on the boundary of B\_inf(E), and the authors prove this in La Rocca et al. (2023).

The modified Algorithm 5 draws a joint configuration and skips it if it is in collision. It then solves the VBOC problem and keeps only the first state of the solution, which is the one guaranteed to lie on the boundary. Keeping only the first state needs more samples than the original formulation, but the resulting data is uniformly distributed.

Each OCP is cheaper to solve here, because the horizon M is fixed and smaller than the one in La Rocca et al. (2023).

The authors trained the network phi on the dataset D, and phi outputs the maximum velocity norm for a joint configuration and velocity direction. The network shows larger prediction errors for velocity norms close to zero, because the dataset is heavily biased toward higher velocity values. Set membership in the safe set S is checked with the constraint (1 − α)φ(x) − \|\|q̇\|\| ≥ 0, where α is the safety margin.

The joint accelerations are the control input, so the robot dynamics form a double integrator. Joint torque bounds become nonlinear constraints, computed with the Recursive Newton-Euler Algorithm from the ADAM library. CasADi builds the symbolic dynamics, costs and constraints, and ACADOS solves the OCPs and integrates the dynamics.

## Failures and cost of the MPC schemes in simulated setpoint regulation

The simulated setpoint task asks the end effector of the Z1 arm to reach a target near a ball and the ground while avoiding collisions. Naive has no safe-set constraint, Zerovel forces an equilibrium terminal state, and STC-MPC uses a soft terminal constraint with a large penalty. The horizon for VBOC and safe abort was fixed to M = 45, and the baselines have no safe-abort mechanism.

The MPC time step was 5 ms, and each simulation lasted 800 time steps.

A task counts as failed when the robot hits a joint bound or the end effector collides with an obstacle. Zerovel never failed, which the authors attribute to its equilibrium terminal state. For short horizons with N ≤ 30, HTC-MPC, RC-MPC and PC-MPC failed less often than STC-MPC. Apart from Zerovel, the other formulations were less sensitive to the horizon length.

Tracking is scored by a cost-surplus that compares each formulation's total cost with the optimal cost. The cost-surplus averages over the tasks where no controller failed, so a failed task is excluded from the average. The optimal cost comes from an OCP on the full horizon, solved with IPOPT using the best simulated trajectories as warm start.

Zerovel's cost-surplus rises quickly for smaller horizons, since its predicted velocity must reach zero in a shorter time. The cost-surplus of the new formulations is slightly lower than Naive's, because Naive often overshoots the target.

At N = 45, the failures of the safe-abort methods fall as the safety margin α grows. Naive is left out of this analysis, since its behavior doesn't depend on α. A larger margin also reduces the false positives of the NN. A larger α shrinks the safe set, so the cost-surplus increases, which is the drawback of a more conservative margin.

## Hardware run of RC-MPC on the Z1

The authors ran RC-MPC on the full 6-DOF Z1 manipulator, which is the hardware test of the approach. They used a time step dt = 10 ms, consistent with the simulations of Section 8.4, despite the larger state dimension. The end effector must track the black box in the human's hand while keeping a safety distance p\_safe, x = 15 cm along the x-axis.

The black box position comes from a motion capture system updated at 10 Hz, and the EE also keeps a reference orientation aligned with the base frame.

Joint friction on the Z1 is high, so the authors didn't use closed-loop MPC. Instead, each time step recomputes the state and control trajectories from its own previous prediction, without real-time state feedback. The MPC state x\*t goes to the hardware through the Unitree Z1 Python API, and the robot tracks it with its internal Proportional Derivative controller.

Figure 9 shows the computation times of a single RC-MPC experiment, with the solver curve in blue and the full Python cycle in green.

Figure 10 tracks three violation measures during the run: state bounds, obstacle distance and the NN safe-set output. The bounds violation is the minimum of x\_max minus x and x minus x\_min, and the obstacle violation is the minimum robot-obstacle distance. The robot was guided toward the obstacles on purpose through the moving black box, to test the robustness of RC-MPC.

All violation measures stayed positive in this single run, so the constraints were respected.

![Figure 10: Constraint violations during the real experiment with RC-MPC](https://refivu.com/papers/0a0f5b84-ffd8-4183-98ce-8b6661b987ad/figures/figure-2df65078ac326e2ac012de3b816cea62.png?thumb=512)

**Figure 10** .Constraint violations during the real experiment with RC-MPC.

[Original paper](https://arxiv.org/abs/2611.06196v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)

## Limits of the guarantees and the experiments

The constraint violations observed in the tests show this gap between the theory and the deployed safe sets. The safe sets come from VBOC, which approximates the viability kernel with a neural network, so the certification gap remains.

Only RC-MPC was run on hardware, and the Z1 run used open-loop control because of the high joint friction. The recursive feasibility argument assumes no disturbances or modeling errors, as the authors state in the description of RC-MPC. The solver alone stayed below the time step at its 99th percentile, so the authors expect a compiled implementation to close the gap.

The experiments used a moving target and the Z1 arm, and they didn't cover legged or underactuated systems.

Model Predictive Shielding is another option, since it doesn't require differentiable dynamics.

## Paper info

- **Authors**: Gianni Lunardi, Elias Fontanari, Matteo Saveriano, Andrea Del Prete
- **Venue**: arXiv · Preprint
- **First published**: 2026-11-4
- **Added**: 2026-11-6
- **Updated**: 2026-11-4
- **Version**: v1
- **arXiv**: 2611.06196
- **Category**: cs.RO
- **Original paper terms**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **What we show**: Paper info, commentary and permitted figures from the original paper

[Original paper ↗](https://arxiv.org/abs/2611.06196v1) · [PDF ↗](https://arxiv.org/pdf/2611.06196v1)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Abstract

Ensuring safety in advanced robot control methods such as Model Predictive Control (MPC) and Reinforcement Learning remains an open challenge. A common approach relies on control-invariant sets, yet their exact computation for nonlinear systems is generally intractable, and numerical approximations compromise theoretical guarantees. In this work, we show that safety does not need to rely exclusively on control invariance. We introduce novel classes of safe sets, each broader than classical control-invariant sets, and analyze corresponding MPC schemes that guarantee recursive feasibility by constraining different nodes of the prediction horizon rather than only the terminal state. Furthermore, when the safe set is an inner approximation of a suitable control-invariant set, our methods can ensure safety through a safe-abort strategy, even in the absence of recursive feasibility. We validate our approaches in extensive simulations on a 6-joint robot manipulator, showing fewer constraint violations than state-of-the-art methods while maintaining comparable tracking performance and computational efficiency. Hardware experiments further demonstrate the practicality of our schemes for real-world robotic applications.

## Quote from the paper

Gianni Lunardi, Elias Fontanari, Matteo Saveriano, Andrea Del Prete (2026). Beyond Terminal Constraints: Reliable Robot Control with Learned Safe Sets. arXiv:2611.06196v1. https://arxiv.org/abs/2611.06196v1

**BibTeX**

```
@misc{lunardi2026beyond,
  title = {{Beyond Terminal Constraints: Reliable Robot Control with Learned Safe Sets}},
  author = {Gianni Lunardi and Elias Fontanari and Matteo Saveriano and Andrea Del Prete},
  year = {2026},
  eprint = {2611.06196},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.06196v1}
}
```

## Other paper commentary

- [Precise and Dexterous Robotic Manipulation via Human-in-the-Loop Reinforcement Learning](https://refivu.com/en/papers/f8ac2bf8-18ae-41b1-9229-515501c8d0d8-precise-and-dexterous-robotic-manipulation-via-human-in.md)
- [Embodied Intelligence via Learning and Evolution](https://refivu.com/en/papers/35077a07-2c81-4b05-87d4-0a4c83ef04af-embodied-intelligence-via-learning-and-evolution.md)
- [cuRoboV2-Fast: Fast Torque-Limited Collision-Free Motion Planning](https://refivu.com/en/papers/0d91c766-4d24-4f97-8fa1-9e5b24f3e4fd-curobov2-fast-fast-torque-limited-collision-free-motion.md)
- [Where Is VLA Inference Time Spent? Bottlenecks and Optimization Interactions Across GPUs](https://refivu.com/en/papers/854119e9-3cbb-49ef-a431-78511985c237-where-is-vla-inference-time-spent-bottlenecks-and.md)
- [Robotic Control via Embodied Chain-of-Thought Reasoning](https://refivu.com/en/papers/e0916502-601d-428e-90b1-cb59f1252a20-robotic-control-via-embodied-chain-of-thought-reasoning.md)
- [For You, Not for Everyone: Bystander-Aware Delivery of Critical Feedback in Robot Tutoring](https://refivu.com/en/papers/8c1c1aa5-32e9-4c82-af22-9a42a6a9a14c-for-you-not-for-everyone-bystander-aware-delivery.md)
- [Reconciling Privacy with Provenance for Language Model Watermarks](https://refivu.com/en/papers/c77fe131-df64-41d1-b92c-88f9147109b4-reconciling-privacy-with-provenance-for-language-model.md)
- [Selective Prediction Intervals: Jointly Learning to Predict, Bound, and Abstain](https://refivu.com/en/papers/c3c86972-2a00-436d-a47b-5ee5b8d85b6e-selective-prediction-intervals-jointly-learning-to-predict.md)
- [Retrieval Supersedes Scale: Efficient Log Level Prediction via Multiplex Socio-Technical Context](https://refivu.com/en/papers/1d3e8983-7d23-49b6-9f2c-a73b6cc445aa-retrieval-supersedes-scale-efficient-log-level-prediction.md)
- [AI-Assisted Classification under Correlation Neglect and Trust](https://refivu.com/en/papers/4b2b2db4-6896-48c0-a3f1-7811c863f6d3-ai-assisted-classification-under-correlation-neglect-and.md)
- [A low-rank decoder bottleneck bounds reliability in foundation-model perturbation prediction](https://refivu.com/en/papers/bf045779-02d9-42f9-9266-e9b3f69bf2f1-a-low-rank-decoder-bottleneck-bounds-reliability-in.md)
- [SciToT: Multimodal Tip-of-the-Tongue Retrieval for Scientific Papers](https://refivu.com/en/papers/4d2f80e0-8a4d-49ac-ac99-266009ebaee2-scitot-multimodal-tip-of-the-tongue-retrieval-for.md)

## Terms in this paper

- [Adam](https://refivu.com/en/terms/0e9ad0199e08-adam)
- [Naive](https://refivu.com/en/terms/e0d1a4d512d4-naive)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/0a0f5b84-ffd8-4183-98ce-8b6661b987ad-beyond-terminal-constraints-reliable-robot-control-with)
