For our first set of results, we consider the setting of safely learning a linear dynamical system involving \(n\) states. For the case \(T=1\), we present a linear programming-based algorithm that either safely recovers the true dynamics from at most $n$ trajectories, or certifies that safe learning is impossible. For \(T=2\), we give a semidefinite representation of the set of safe initial conditions and show that \(\lceil n/2 \rceil\) trajectories generically suffice for safe learning. For \(T = \infty\), we provide semidefinite representable inner approximations of the set of safe initial conditions and show that one trajectory generically suffices for safe learning. Finally, we extend a number of our results to the cases where the initial uncertainty set contains sparse, low-rank, or permutation matrices, or when the dynamical system involves a control input.
Our second set of results concerns the problem of safely learning a general class of nonlinear dynamical systems. For the case \(T=1\), we give a second-order cone programming based representation of the set of safe initial conditions. For \(T=\infty\), we provide semidefinite representable inner approximations to the set of safe initial conditions. We show how one can safely collect trajectories and fit a polynomial model of the nonlinear dynamics that is consistent with the initial uncertainty set and best agrees with the observations. We also present extensions of some of our results to the cases where the measurements are noisy or the dynamical system involves disturbances.