Synthesis of safe controller via supervised learning for truck lateral control

Yuxiao Chen, Ayonga Hereid, Huei Peng, Jessy W. GrizzlearXiv 2017 · OpenReview

TL;DR

This paper presents a novel approach to combine the provable safety guarantees of Control Barrier Functions (CBFs) with the performance-enhancing capabilities of supervised learning for truck lateral control. By generating a safe training dataset using trajectory optimization that incorporates CBF constraints, they train a neural network to act as a high-performance "student" controller, which is then supervised by a CBF to ensure safety. This method significantly reduces CBF interventions, leading to smoother control and better performance while maintaining safety guarantees.

What Problem Does This Paper Address?

Designing controllers for complex systems like articulated trucks presents a significant challenge: achieving both high performance and guaranteed safety. Traditional safety mechanisms, such as Control Barrier Functions (CBFs), can ensure safety by acting as supervisors to an existing controller. However, these supervisory interventions often lead to degraded performance, resulting in jerky or suboptimal control. On the other hand, machine learning, particularly neural networks, can learn complex control policies that achieve excellent performance, but their internal workings are often opaque, making it difficult to guarantee their safety. This paper addresses the fundamental trade-off between safety and performance in control systems, aiming to achieve both by intelligently combining these two powerful but disparate approaches.

Methods

The core of the proposed method lies in a two-stage process:

  1. Safe Trajectory Generation: Instead of directly learning a control policy, the authors first generate a library of "safe" desired trajectories. This is achieved through trajectory optimization, specifically using direct collocation. Crucially, this optimization process incorporates the CBF constraint, ensuring that all generated trajectories inherently satisfy safety requirements. This step transforms the difficult problem of learning a safe controller into the more tractable problem of generating safe trajectories.
  2. Supervised Learning for Performance: A neural network is then trained using this generated library of safe trajectories. The neural network learns to map initial conditions (features) to a parameterized desired trajectory. This "student" controller is designed to mimic the good performance observed in the optimized trajectories.
  3. CBF as a Safety Supervisor: The trained neural network acts as the primary performance controller. A CBF-based supervisory controller is then overlaid. While the training data ensures the student controller is likely to be safe, the CBF provides a formal, provable safety guarantee. It intervenes only when absolutely necessary, minimizing performance degradation.

The paper also details the use of Sum of Squares (SOS) programming for synthesizing the CBF and a continuous-hold (CH) controller to execute the generated trajectories.

Datasets

The paper does not introduce new benchmarks but rather generates its own training datasets. Two training sets, S₁ and S₂, are created:

  • S₁: Contains trajectories for a duration of 1 second, with features (initial conditions) spanning a wider range, designed to train the controller for severe initial conditions and transient situations.
  • S₂: Contains trajectories for a duration of 3 seconds, with features more concentrated around the origin, intended for training on mild situations and normal driving.

These datasets are generated by performing trajectory optimization for a large number of initial conditions, ensuring that the generated trajectories satisfy the CBF constraint.

Key Insights and Ideas

  • Decomposing Safety and Performance: The paper elegantly separates the problem of guaranteeing safety from achieving high performance. By first generating safe trajectories and then learning to follow them, they avoid the inherent difficulty of directly learning a safe control policy from scratch.
  • Trajectory Optimization as a Safety Enforcer: Using trajectory optimization with CBF constraints is a powerful way to create a rich dataset of safe behaviors. This is more tractable than directly synthesizing a safe controller for all possible scenarios.
  • Supervised Learning for "Good Behavior" Mimicry: The neural network learns to replicate the desirable properties (smoothness, efficiency) of the optimized safe trajectories, effectively inheriting the performance characteristics of the training data.
  • CBF as a Minimalist Supervisor: The CBF's role is reduced to a safety net. Because the learned controller is trained on safe data, the CBF is rarely triggered, leading to smoother control compared to traditional CBF implementations.

Key Results

  • The proposed learning-based controller, when used as the performance controller supervised by a CBF, rarely requires intervention from the CBF supervisor. This is a significant improvement over traditional methods where CBF interventions can be frequent and disruptive.
  • In simulations with an articulated truck model in TruckSim, the controller demonstrated good performance and ride comfort, even under challenging conditions like large initial lateral deviations and side-wind disturbances.
  • A comparison with a tuned LQR controller showed that while the LQR performed well under normal conditions, it triggered frequent and severe CBF interventions under bad initial conditions, leading to poor performance. The proposed method, in contrast, showed none or very mild interventions in similar scenarios.

Limitations and Future Work

  • Extrapolation Issues: The performance of the learned controller can degrade when faced with initial conditions outside the range of the training data (extrapolation). The authors suggest that adequate coverage of training data is crucial.
  • Data Coverage and Regression Accuracy: Stacking a large range of features in the training data can sometimes lead to a drop in regression accuracy. Future work could explore more complex neural network architectures or ensembles of networks for different situations.
  • Generalizability: While the method is demonstrated on truck lateral control, its applicability to other complex nonlinear systems is a natural extension.
  • Real-world Deployment: The current work is validated through simulation. Real-world deployment would require further investigation into robustness against sensor noise and unmodeled dynamics.

Summary updated

Abstract

Correct-by-construction techniques, such as control barrier functions (CBFs), can be used to guarantee closed-loop safety by acting as a supervisor of an existing or legacy controller. However, supervisory-control intervention typically compromises the performance of the closed-loop system. On the other hand, machine learning has been used to synthesize controllers that inherit good properties from a training dataset, though safety is typically not guaranteed due to the difficulty of analyzing the associated neural network. In this paper, supervised learning is combined with CBFs to synthesize controllers that enjoy good performance with provable safety. A training set is generated by trajectory optimization that incorporates the CBF constraint for an interesting range of initial conditions of the truck model. A control policy is obtained via supervised learning that maps a feature representing the initial conditions to a parameterized desired trajectory. The learning-based controller is used as the performance controller and a CBF-based supervisory controller guarantees safety. A case study of lane keeping for articulated trucks shows that the controller trained by supervised learning inherits the good performance of the training set and rarely requires intervention by the CBF supervisor
BibTeX
@misc{chen2017synthesis,
  author = {Yuxiao Chen and Ayonga Hereid and Huei Peng and Jessy W. Grizzle},
  title = {{Synthesis of safe controller via supervised learning for truck lateral control}},
  year = {2017},
  eprint = {1712.05506},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1712.05506},
}

Loading related content...

Figure