  The growing need for high-performance controllers in safety-critical
applications like autonomous driving has been motivating the development of
formal safety verification techniques. In this paper, we design and implement a
predictive safety filter that is able to maintain vehicle safety with respect
to track boundaries when paired alongside any potentially unsafe control
signal, such as those found in learning-based methods. A model predictive
control (MPC) framework is used to create a minimally invasive algorithm that
certifies whether a desired control input is safe and can be applied to the
vehicle, or that provides an alternate input to keep the vehicle in bounds. To
this end, we provide a principled procedure to compute a safe and invariant set
for nonlinear dynamic bicycle models using efficient convex approximation
techniques. To fully support an aggressive racing performance without
conservative safety interventions, the safe set is extended in real-time
through predictive control backup trajectories. Applications for assisted
manual driving and deep imitation learning on a miniature remote-controlled
vehicle demonstrate the safety filter's ability to ensure vehicle safety during
aggressive maneuvers.
