  In this paper, we present a novel sufficient condition for the stability of
discrete-time linear systems that can be represented as a set of piecewise
linear constraints, which make them suitable for quadratic programming
optimization problems. More specifically, we tackle the problem of imposing
asymptotic stability to a Koopman matrix learned from data during iterative
gradient descent optimization processes. We show that this sufficient condition
can be decoupled by rows of the system matrix, and propose a control barrier
function-based projected gradient descent to enforce gradual evolution towards
the stability set by running an optimization-in-the-loop during the iterative
learning process. We compare the performance of our algorithm with other two
recent approaches in the literature, and show that we get close to
state-of-the-art performance while providing the added flexibility of allowing
the optimization problem to be further customized for specific applications.
