Abstract
We propose a policy search approach to learn controllers from specifications given as Signal Temporal Logic (STL) formulae. The system model, which is unknown but assumed to be an affine control system, is learned together with the control policy. The model is implemented as two feedforward neural networks (FNNs) - one for the drift, and one for the control directions. To capture the history dependency of STL specifications, we use a recurrent neural network (RNN) to implement the control policy. In contrast to prevalent model-free methods, the learning approach proposed here takes advantage of the learned model and is more efficient. We use control barrier functions (CBFs) with the learned model to improve the safety of the system. We validate our algorithm via simulations and experiments. The results show that our approach can satisfy the given specification within very few system runs, and can be used for on-line control.
Introduction
In robotics, defining complex, time-bound behaviors—such as "visit region A, then region B within 10 seconds, while always avoiding obstacles"—is a significant challenge. Signal Temporal Logic (STL) provides a formal language to specify these requirements. However, implementing STL-based control in real-world scenarios faces three major hurdles: model uncertainty, history dependency (the need to remember past states to satisfy temporal rules), and the inherent trade-off between learning efficiency and safety.
This paper introduces a data-efficient, model-based policy search method to control unknown systems under complex STL specifications. By combining Recurrent Neural Networks (RNNs) for history-dependent control and uncertainty-aware Control Barrier Functions (CBFs) for safety, the proposed framework achieves high success rates in both simulations and real-world robot experiments with remarkably few training runs.
Methodology
The core of the approach is a Model-based Safe Policy Search framework that learns the system model and the control policy simultaneously.
Learned Affine Model
The system is modeled as an affine control system: $x_{t+1} = f(x_t) + g(x_t)u_t$. The functions $f$ and $g$ are approximated using two Feedforward Neural Networks (FNNs) with dropout. This dropout mechanism acts as a Bayesian approximation, allowing the model to estimate its own uncertainty—a critical component for safe exploration.
RNN Controller and STL Robustness
To handle the history-dependent nature of STL, the control policy $\pi$ is implemented as an RNN (specifically an LSTM). This architecture allows the controller to maintain an internal state representing the task's progress. The policy is trained to maximize "STL robustness," a metric quantifying how well a trajectory satisfies a given formula, using gradient-based optimization (STLCG).
Safe Exploration with CBFs
To ensure safety during the learning phase, the framework employs Control Barrier Functions (CBFs). These functions incorporate the model's uncertainty (derived from dropout variance) into the constraints. This makes the safety mechanism robust to errors in the early-stage learned model, effectively adding a safety margin that shrinks as model accuracy improves.
Experimental Evaluation
The algorithm was validated through two primary scenarios where data was generated online rather than relying on pre-existing datasets:
- Baxter Simulation: A 7-DOF robot arm performed a pick-and-place task in Gazebo. The robot had to move objects between regions while maintaining specific gripper orientations and avoiding obstacles.
- Multi-Robot Experiment: Three iRobot Create2 ground robots performed a coordinated "fire-fighting" scenario in a motion-capture environment, requiring them to visit "hospitals," "fire stations," and "hydrants" while maintaining safe inter-robot distances.
Key Results
The model-based approach proved significantly more efficient than model-free alternatives. In the Baxter simulation, a 100% success rate was achieved after just 5 training cycles (approximately 50 minutes). In the multi-robot scenario, a successful policy was learned in 4 cycles (approximately 20 minutes).
As shown in the results table, the inclusion of CBFs significantly reduced the "unsafe rate" ($\beta$) during early training stages. While model-free RL often requires thousands of runs, this framework reached convergence in roughly 180 runs.
Conclusion and Future Work
This research demonstrates that model-based learning, when paired with safety-aware exploration and memory-capable controllers, can efficiently solve complex STL tasks. However, some limitations remain. The current method assumes an affine control structure and a relative degree of 1 for CBFs. Future work will explore high-order CBFs for systems where control does not immediately affect safety variables and investigate more direct methods for handling non-linear safety constraints in complex kinematics.
Summary updated