  This paper proposes a method to identify a Koopman model of a
feedback-controlled system given a known controller. The Koopman operator
allows a nonlinear system to be rewritten as an infinite-dimensional linear
system by viewing it in terms of an infinite set of lifting functions. A
finite-dimensional approximation of the Koopman operator can be identified from
data by choosing a finite subset of lifting functions and solving a regression
problem in the lifted space. Existing methods are designed to identify
open-loop systems. However, it is impractical or impossible to run experiments
on some systems, such as unstable systems, in an open-loop fashion. The
proposed method leverages the linearity of the Koopman operator, along with
knowledge of the controller and the structure of the closed-loop system, to
simultaneously identify the closed-loop and plant systems. The advantages of
the proposed closed-loop Koopman operator approximation method are demonstrated
in simulation using a Duffing oscillator and experimentally using a rotary
inverted pendulum system. An open-source software implementation of the
proposed method is publicly available, along with the experimental dataset
generated for this paper.
