Shielded Deep Reinforcement Learning for Complex Spacecraft Tasking

Robert Reed, Hanspeter Schaub, Morteza Lahijanian

Introduction

As space missions grow in complexity and frequency, the demand for autonomous spacecraft control has intensified. Traditional methods for spacecraft task scheduling—such as imaging targets or managing power cycles—rely heavily on human intervention or rigid, rule-based autonomy. While Deep Reinforcement Learning (DRL) offers a promising path toward handling high-dimensional environments and complex mission goals, its "black box" nature presents significant risks. Without inherent safety guarantees, a DRL agent might prioritize mission objectives at the cost of catastrophic failures, such as depleting batteries or exceeding reaction wheel speed limits.

This paper introduces a Shielded Deep Reinforcement Learning (SDRL) framework designed to bridge the gap between the performance of DRL and the rigorous safety requirements of space flight. By combining formal methods with empirical simulation, the authors provide a verifiable way to ensure mission safety without sacrificing the agent's ability to learn complex behaviors.

Methodology

The proposed SDRL framework integrates formal logic into the reinforcement learning pipeline through three primary components: formal specification, automated reward construction, and a probabilistic safety shield.

Formal Specification and Reward Construction

The authors utilize Linear Temporal Logic (LTL) to define mission requirements. LTL allows for the precise definition of both "liveness" properties (tasks the agent must complete, such as imaging a target five times) and "safety" properties (states the agent must avoid, such as low power). To integrate these into the DRL process, the LTL formulas are converted into a Deterministic Finite Automaton (DFA). This DFA is merged with the system model to create a "Product MDP," which allows the reward function to be generated automatically based on the agent's progress toward the formal goal. This eliminates the need for manual, error-prone reward shaping.

The Probabilistic Shield

To prevent unsafe actions in real-time, the framework employs a "shield" that monitors and filters the agent's decisions. The shield is built upon a reduced-order "Safety MDP." Rather than relying on human intuition to define safety boundaries, the authors use the Basilisk Astrodynamics Framework—a high-fidelity, flight-approved physics engine—to empirically determine transition probabilities.

The study evaluates three distinct shield designs:

  1. One-Step: Ensures the immediate next state is safe.
  2. Two-Step: Recursively ensures safety for two steps into the future.
  3. Q-optimal: Uses dynamic programming to minimize the probability of entering an unsafe state over a specific time horizon.

Experimental Setup

The framework was tested in a simulation environment where the agent observed 19 variables, including position, velocity, attitude error, reaction wheel speeds, and battery charge. The tasks ranged from simple imaging missions to complex "alternating mode" tasks requiring the agent to switch between different sensors while maintaining strict power and orientation constraints.

Key Insights and Results

The Synergy of Rewards and Shields

A critical finding of the research is the relationship between the reward structure and the shield's efficiency. When the safety specification is included in the LTL-based reward function during training, the agent "learns" to be safe. Consequently, the shield acts as a secondary safety net rather than a constant corrector. In the one-step shield case, including safety in the reward reduced the number of shield interventions by nearly 70% (dropping from approximately 13.6 to 3.7 interventions per episode).

Performance and Reliability

The SDRL framework demonstrated a significant improvement over unshielded agents:

  • Zero Failures: In complex scenarios where unshielded agents experienced a 10.9% failure rate, all three shielded designs successfully reduced the failure rate to 0%.
  • Task Satisfaction: Policies trained with the LTL-based reward structure achieved a 99% task satisfaction rate, significantly outperforming traditional sparse reward structures that often struggle with the "state explosion" problem in complex environments.
  • Probabilistic Flexibility: By using a probabilistic threshold (e.g., $p=0.05$) rather than demanding absolute 100% safety, the framework remains robust in noisy physical environments where absolute certainty is impossible.

Conclusion and Future Work

The SDRL framework provides a rigorous method for deploying DRL in high-stakes spacecraft missions. By focusing the Safety MDP on critical variables like power and wheel speed, the authors maintain computational efficiency while ensuring mission integrity.

However, limitations remain. The current Safety MDP relies on "worst-case" assumptions for variables not explicitly modeled, which can lead to overly conservative behavior. Future research aims to further formalize the Safety MDP construction to reduce empirical dependency and explore the scalability of this framework for multi-satellite constellations.

Summary updated

Abstract

Autonomous spacecraft control via Shielded Deep Reinforcement Learning (SDRL) has become a rapidly growing research area. However, the construction of shields and the definition of tasking remains informal, resulting in policies with no guarantees on safety and ambiguous goals for the RL agent. In this paper, we first explore the use of formal languages, namely Linear Temporal Logic (LTL), to formalize spacecraft tasks and safety requirements. We then define a manner in which to construct a reward function from a co-safe LTL specification automatically for effective training in SDRL framework. We also investigate methods for constructing a shield from a safe LTL specification for spacecraft applications and propose three designs that provide probabilistic guarantees. We show how these shields interact with different policies and the flexibility of the reward structure through experimentation.
BibTeX
@inproceedings{reed2024shielded,
  author = {Robert Reed and Hanspeter Schaub and Morteza Lahijanian},
  title = {{Shielded Deep Reinforcement Learning for Complex Spacecraft Tasking}},
  booktitle = {ACC},
  year = {2024},
  url = {https://openreview.net/forum?id=JPEypth7tX},
}
Figure