원시데이터 수집 시스템
선정목록으로

Koopman invariant subspaces and finite linear representations of nonlinear dynamical systems for control

관련 산업용 섬유 · (8) HDPE 섬유(FORPE)

기본 정보

저자
  1. Brunton, Steven L.
  2. Brunton, Bingni W.
  3. Proctor, Joshua L.
  4. Kutz, J. Nathan
DOI
10.48550/arxiv.1510.03007
저널
arXiv (Cornell University)
발행년도
2022
발행기관
Cornell University
피인용수
0
라이선스
0
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.48550/arxiv.1510.03007
토픽
Chemical and Physical Properties of Materials
OpenAlex ID
W6929172876

평가 내용

관련도
관련
사업분야
산업용 섬유 · (8) HDPE 섬유(FORPE)
부 분야
–
R&D 측면
–
확신도
–
근거 용어
–
판단 근거
임베딩 유사도 기반 평가로 '산업용 섬유 > HDPE 섬유(FORPE)' 분야에 선정된 논문입니다.
R&D 활용 포인트
–
평가 입력
–

초록

In this work, we explore finite-dimensional linear representations of nonlinear dynamical systems by restricting the Koopman operator to an invariant subspace. The Koopman operator is an infinite-dimensional linear operator that evolves observable functions of the state-space of a dynamical system [Koopman 1931, PNAS]. Dominant terms in the Koopman expansion are typically computed using dynamic mode decomposition (DMD). DMD uses linear measurements of the state variables, and it has recently been shown that this may be too restrictive for nonlinear systems [Williams et al. 2015, JNLS]. Choosing nonlinear observable functions to form an invariant subspace where it is possible to obtain linear models, especially those that are useful for control, is an open challenge. Here, we investigate the choice of observable functions for Koopman analysis that enable the use of optimal linear control techniques on nonlinear problems. First, to include a cost on the state of the system, as in linear quadratic regulator (LQR) control, it is helpful to include these states in the observable subspace, as in DMD. However, we find that this is only possible when there is a single isolated fixed point, as systems with multiple fixed points or more complicated attractors are not globally topologically conjugate to a finite-dimensional linear system, and cannot be represented by a finite-dimensional linear Koopman subspace that includes the state. We then present a data-driven strategy to identify relevant observable functions for Koopman analysis using a new algorithm to determine terms in a dynamical system by sparse regression of the data in a nonlinear function space [Brunton et al. 2015, arxiv]; we show how this algorithm is related to DMD. Finally, we demonstrate how to design optimal control laws for nonlinear systems using techniques from linear optimal control on Koopman invariant subspaces.

본문 72,944자

본문 펼치기
## Koopman invariant subspaces and finite linear representations of nonlinear dynamical systems for control Steven L. Brunton <sup>1</sup> <sup>_∗_</sup>, Bingni W. Brunton <sup>2</sup>, Joshua L. Proctor <sup>3</sup>, J. Nathan Kutz <sup>4</sup> 1 Department of Mechanical Engineering, University of Washington, Seattle, WA 98195, United States 2 Department of Biology, University of Washington, Seattle, WA 98195, United States 3Institute for Disease Modeling, Bellevue, WA 98004, United States 4 Department of Applied Mathematics, University of Washington, Seattle, WA 98195, United States Abstract In this work, we explore finite-dimensional linear representations of nonlinear dynamical systems by restricting the Koopman operator to an invariant subspace spanned by specially chosen observable functions. The Koopman operator is an infinite-dimensional linear operator that evolves functions of the state of a dynamical system [1, Koopman 1931]. Dominant terms in the Koopman expansion are typically computed using dynamic mode decomposition (DMD). DMD uses linear measurements of the state variables, and it has recently been shown that this may be too restrictive for nonlinear systems [2, Williams et al., 2015]. Choosing the right _nonlinear_ observable functions to form an invariant subspace where it is possible to obtain linear reduced-order models, especially those that are useful for control, is an open challenge. Here, we investigate the choice of observable functions for Koopman analysis that enable the use of optimal linear control techniques on nonlinear problems. First, to include a cost on the state of the system, as in linear quadratic regulator (LQR) control, it is helpful to include these states in the observable subspace, as in DMD. However, we find that this is only possible when there is a single isolated fixed point, as systems with multiple fixed points or more complicated attractors are not globally topologically conjugate to a finite-dimensional linear system, and cannot be represented by a finite-dimensional linear Koopman subspace that includes the state. We then present a data-driven strategy to identify relevant observable functions for Koopman analysis by leveraging a new algorithm to determine relevant terms in a dynamical system by _ℓ_ 1-regularized regression of the data in a nonlinear function space [3, Brunton et al., 2015]; we also show how this algorithm is related to DMD. Finally, we demonstrate the usefulness of nonlinear observable subspaces in the design of Koopman operator optimal control laws for fully nonlinear systems using techniques from linear optimal control. _Keywords–_ Dynamical systems, Koopman analysis, Hilbert space, Observable functions, Dynamic mode decomposition, System identification, Optimal control, Koopman optimal control. ### 1 Introduction Koopman spectral analysis provides an operator-theoretic perspective to dynamical systems, which complements the more standard geometric [4] and probabilistic perspectives. In the early 1930s [1, 5], B. O. Koopman showed that nonlinear dynamical systems associated with Hamiltonian flows could be analyzed with an infinite dimensional linear operator on the Hilbert space of observable functions. For Hamiltonian fluids, the Koopman operator is unitary, meaning that the inner product of any two observable functions remains unchanged by the operator. Unitarity is a familiar concept, as the discrete Fourier transform (DFT) and the proper orthogonal decomposition (POD) [6] both provide unitary coordinate transformations. In the original paper [1], Koopman _∗_ Corresponding author Email: sbrunton@uw.edu (S.L. Brunton). 1 drew connections between the Koopman eigenvalue spectrum and conserved quantities, integrability, and ergodicity. Recently, it was shown that level sets of the Koopman eigenfunctions form invariant partitions of the state-space of a dynamical system [7]; in particular, eigenfunctions of the Koopman operator may be used to analyze the ergodic partition [8, 9]. Koopman analysis has also been recently shown to generalize the Hartman-Grobman theorem to the entire basin of attraction of a stable or unstable equilibrium point or periodic orbit [10]. For more information there are a number of excellent in-depth reviews on Koopman analysis by Mezi´c et al. [11, 12]. Koopman analysis has been at the focus of recent data-driven efforts to characterize complex systems, since the work of Mezi´c and Banaszuk [13] and Mezi´c [14]. There is considerable interest in obtaining finite-rank approximations to the linear Koopman operator that propagate the original nonlinear dynamics. This is especially promising for the potential control of nonlinear systems [15]. However, by introducing the Koopman operator, we trade nonlinear dynamics for infinite-dimensional linear dynamics, introducing new challenges. Finite-dimensional linear approximations of the Koopman operator may be useful to model the dynamics on an attractor, and those that explicitly advance the state may also be useful for control. Any set of Koopman eigenfunctions will form a Koopman-invariant subspace, resulting in an exact finite-dimensional linear model. Unfortunately, many dynamical systems do not admit a finite-dimensional Koopmaninvariant subspace that also spans the state; in fact, this is only possible for systems with an isolated fixed point. It may be possible to recover the state from the Koopman eigenfunctions, but determining the eigenfunctions and inverting for the state may both be challenging. Dynamic mode decomposition (DMD), introduced in the fluid dynamics community [16, 17, 18, 19], provides a practical numerical framework for Koopman mode decomposition. DMD implicitly uses linear observable functions, such as direct velocity field measurements from particle image velocimetry (PIV). In other words, the observable function is an identity map on the fluid flow state. This set of linear observables is too limited to describe the rich dynamics observed in fluids or other nonlinear systems. Recently, DMD has been extended to include a richer set of nonlinear observable functions, providing the ability to effectively analyze nonlinear systems [2]. Because of the extreme cost associated with this extended DMD for high-dimensional systems, a variation using the kernel trick from machine learning has been implemented to make the cost of extended DMD equivalent to traditional DMD, but retaining the benefit of nonlinear observables [20]. However, choosing the correct nonlinear observable functions to use for a given system, and how they will impact the performance of Koopman mode decomposition and reduction, is still an open problem. Presently, these observable functions are either determined using information about the right-hand side of the dynamics (i.e., knowing that the Navier-Stokes equations have quadratic nonlinearities, etc.) or by brute-force trial and error in a particular basis for Hilbert space (i.e., trying many different polynomial functions). In this work, we explore the identification of observable functions that span a finite-dimensional subspace of Hilbert space which remains invariant under the Koopman operator (i.e., a Koopmaninvariant subspace spanned by eigenfunctions of the Koopman operator). When this subspace includes the original states, we obtain a finite-dimensional linear dynamical system on this subspace that also advances the original state directly. We utilize a new algorithm, the sparse identification of nonlinear dynamics (SINDy) [3], to first identify the right-hand side dynamics of the nonlinear system. Next, we choose observable functions such that these dynamics are in the span. Finally, for certain dynamical systems with an isolated fixed point, we construct a finite-dimensional Koopman operator that also advances the state directly. For the examples presented, this procedure is closely related to the Carleman linearization [21, 22, 23], which has extensions to nonlinear control [24, 25, 26]. Afterward, it is possible to develop a _nonlinear_ Koopman operator optimal control (KOOC) law, even for nonlinear fixed points, using techniques from linear optimal control theory. 2 ### 2 Background on Koopman analysis Consider a continuous-time dynamical system, given by: _<u>d</u>_ _dt_ <sup>x</sup> <sup>=</sup> <sup>f</sup> <sup>(</sup> <sup>x</sup> <sup>)</sup> <sup>_,_</sup> (1) where x _∈_ M is an _n_ -dimensional state on a smooth manifold M . The vector field f is an element of the tangent bundle TM of M, such that f ( x ) _∈_ TxM . Note that in many cases we dispense with manifolds and choose M = R <sup>_n_</sup> and f a Lipschitz continuous function. For a given time _t_, we may consider the flow map F _t_ : M _→_ M, which maps the state x ( _t_ 0) forward time _t_ into the future to x ( _t_ 0 + _t_ ), according to: - _t_ 0+ _t_ F _t_ ( x ( _t_ 0)) = x ( _t_ 0 + _t_ ) = x ( _t_ 0) + _t_ 0 f ( x ( _τ_ )) _dτ._ (2) In particular, this induces a discrete-time dynamical system: x _k_ +1 = F _t_ ( x _k_ ) _,_ (3) where x _k_ = x ( _kt_ ). In general, discrete-time dynamical systems are _more_ general than continuous time systems, but we choose to start with continuous time for illustrative purposes. We also define a real-valued observable function _g_ : M _→_ R, which is an element of an infinitedimensional Hilbert space. Typically, the Hilbert space is given by the Lebesque square-integrable functions on M ; other choices of a measure space are also valid. The Koopman operator _Kt_ is an infinite-dimensional linear operator that acts on observable functions _g_ as: _Ktg_ = _g ◦_ F _t_ (4) where _◦_ is the composition operator, so that: _Ktg_ ( x _k_ ) = _g_ ( F _t_ ( x _k_ )) = _g_ ( x _k_ +1) _._ (5) In other words, the Koopman operator _Kt_ defines an infinite-dimensional linear dynamical system that advances the observation of the state _gk_ = _g_ ( x _k_ ) to the next timestep: _g_ ( x _k_ +1) = _Ktg_ ( x _k_ ) _._ (6) Note that this is true for _any_ observable function _g_ and for any point x _k_ _∈_ M . In the original paper by Koopman, Hamiltonian fluid systems with a positive density were investigated. In this case, the Koopman operator _Kt_ is unitary, and forms a one-parameter family of unitary transformations in Hilbert space. The Koopman operator is also known as the composition operator, which is formally the pull-back operator on the space of scalar observable functions [27]. The Koopman operator is the dual, or left-adjoint, of the Perron-Frobenius operator, or transfer operator, which is the push-forward operator on the space of probability density functions. We may also describe the continuous-time version of the Koopman dynamical system in Eq. (6) with the infinitesimal generator _K_ of the one-parameter family of transformations _Kt_ [27] : _<u>d</u>_ _dt_ <sup>_g_</sup> <sup>=</sup> <sup>_Kg._</sup> (7) The linear dynamical systems in Eqs. (7) and (6) are analogous to the dynamical systems in Eqs. (1) and (3), respectively. It is important to note that the original state x may be the observable, and the infinite-dimensional operator _Kt_ will advance this observable function. Again, for Hamiltonian systems, the infinitesimal generator _K_ is self-adjoint. 3 R <sup>_m_</sup> F _t_ _x_ 2 M _x_ 3 _y_ 2 _y_ _N_ _x_ _N_ _g_ _y_ 3 M _g_ K _t_ _x_ 1 _y_ 1 K _t_ K _t_ K _t_ K _t_ ... ... _y_ 1 _y_ 2 _y_ 3 ... _y_ _N_ _g_ _g_ _g_ _g_ _g_ _x_ 1 _x_ 2 _x_ 3 ... _x_ _N_ F _f_ _t_ : _x_ _k_ _7!_ _x_ _k_ +1 _g_ : _x_ _k_ _7!_ _y_ _k_ K _U_ _t t_ : _y_ _k_ _7!_ _y_ _k_ +1 F _t_ F _t_ F _t_ F _t_ Figure 1: Schematic illustrating the Koopman operator for nonlinear dynamical systems. The dashed lines from _yk_ _→_ _xk_ indicate that we would like to be able to recover the original state. ### 3 Koopman invariant subspaces and exact finite-dimensional models As with any vector space, we may choose a basis for Hilbert space and represent our observable function _g_ in this basis. For simplicity, let us consider basis observable functions _y_ 1( x ), _y_ 2( x ), etc., and let a given function _g_ ( x ) be written in these coordinates as: _g_ = _∞_ _k_ =1 _αkyk._ (8) A _Koopman-invariant subspace_ is given by span _{ys_ 1 _, ys_ 2 _, · · ·_ _, ysm}_ if all functions _g_ in this subspace, _g_ = _α_ 1 _ys_ 1 + _α_ 2 _ys_ 2 + _· · ·_ + _αmysm,_ (9) remain in this subspace after being acted on by the Koopman operator _K_ : _Kg_ = _β_ 1 _ys_ 1 + _β_ 2 _ys_ 2 + _· · ·_ + _βmysm._ (10) For functions in these invariant subspaces, it is possible to restrict the Koopman operator to this subspace, yielding a finite-dimensional linear operator K . K acts on a vector space R <sup>_m_</sup>, with the coordinates given by the values of _ysk_ ( x ). This induces a finite-dimensional linear system, as in Eqs. (6) and (7). Koopman eigenfunctions _ϕ_, such that _Kϕ_ = _λϕ_, generate invariant subspaces; however, it may or may not be possible to invert these functions to recover the original state x . For control, we may seek Koopman-invariant subspaces that include the original state variables _x_ 1, _x_ 2, _· · ·_, _xn_ . The Koopman operator restricted to this subspace is finite-dimensional, linear, and it advances the original state dynamics, as well as the other observables in the subspace, as shown in Fig. 1. These Koopman-invariant subspaces may be identified using data-driven methods, as discussed in Sec. 3.1. In the following sections, we will show that including the state in our observable subspace is rather restrictive, and it is not possible for the vast majority of nonlinear systems. In fact, it is impossible to determine a finite-dimensional Koopman-invariant subspace that includes the original state variables for any system with multiple fixed points or any more general attractors. This is because all finite-dimensional linear systems have a single fixed point, and cannot be topologically conjugate to a system with multiple fixed points. This does not, however, preclude the identification of Koopman-invariant subspaces spanned by Koopman eigenfunctions _ϕ_, which may provide useful intrinsic coordinates [28]. In fact, it is possible to establish 4 topological conjugacy of the entire basin of attraction of a stable or unstable fixed point or periodic orbit with an associated linear system through the Koopman operator, as shown in [10, 12]. It may be possible to invert these coordinates to recover the states, although determining eigenfunctions and inverting them to obtain the state may both be challenging. For the original state variables _x_ 1, _x_ 2, _· · ·_, _xn_ to be included in the Koopman-invariant subspace, then the nonlinear right hand side function f must also be in this subspace:   _f_ 1( _x_ 1 _, x_ 2 _, · · ·_ _, xn_ ) _f_ 2( _x_ 1 _, x_ 2 _, · · ·_ _, xn_ ) ... _fn_ ( _x_ 1 _, x_ 2 _, · · ·_ _, xn_ )    =  _<u>d</u>_ _<u>d</u>_ _dt_ <sup>x</sup> <sup>=</sup> <sup>f</sup> <sup>(</sup> <sup>x</sup> <sup>)</sup> = _⇒_ _dt_  _x_ 1 _x_ 2 ... _xn_ (11)  _._ The state variables x form the first _n_ observable functions _ys_ 1 = _x_ 1, _ys_ 2 = _x_ 2, _· · ·_, _ysn_ = _xn_, and the remaining _m −_ _n_ observables are nonlinear functions required to represent the terms in f . If it is possible to represent each term _fk_ as a combination of observable functions in the subspace, _fk_ ( _x_ 1 _, x_ 2 _, · · ·_ _, xn_ ) = _ck,_ 1 _ys_ 1 + _ck,_ 2 _ys_ 2 + _· · ·_ + _ck,mysm,_ (12) then we may write the first _n_ rows of the Koopman-induced dynamical system as:       _y_ 1 _y_ 2 ... _ym_ _y_ 1 _y_ 2 ... _ym_     _<u>d</u>_ _dt_  ... _yn_ _yn_ +1 =  _c_ 1 _,_ 1 _c_ 1 _,_ 2 _· · ·_ _c_ 1 _,n_ _c_ 1 _,n_ +1 _· · ·_ _c_ 1 _,m_ _c_ 2 _,_ 1 _c_ 2 _,_ 2 _· · ·_ _c_ 2 _,n_ _c_ 2 _,n_ +1 _· · ·_ _c_ 2 _,m_ ... ... ... ... ... ... ... _cn,_ 1 _cn,_ 2 _· · ·_ _cn,n_ _cn,n_ +1 _· · ·_ _cn,m_ ? ? _· · ·_ ? ? _· · ·_ ? ... ... ... ... ... ... ... ? ? _· · ·_ ? ? _· · ·_ ? ... _yn_ _yn_ +1 _._ (13) In practice, the last _m −_ _n_ rows may be determined analytically, by successively computing _dt_ <sup>_<u>d</u>_</sup> <sup>_yk_</sup> for _k_ _> n_ and representing these derivatives in terms of other subspace observables. Knowing the dynamics f is essential to choose a relevant observable subspace. If the dynamics are known, observables may be derived analytically. Alternatively, a least-squares regression may be performed using data, as in the extended DMD [2]. 3.1 Data-driven sparse identification of nonlinear observable functions It is clear from Eqs. (11)–(13) that the choice of relevant Koopman observable functions is closely related to the form of the nonlinearity in the dynamics. In the case that governing equations are unknown, _data-driven_ strategies must be employed to determine useful observable functions. A recently developed technique allows for the identification of the nonlinear dynamics in Eq. (11), purely from measurements of the system [3]. The so-called sparse identification of nonlinear dynamics (SINDy) algorithm uses sparse regression [29] in a nonlinear function space to determine the relevant terms in the dynamics. This may be thought of as a generalization of earlier methods that employ symbolic regression (i.e., genetic programming [30]) to identify dynamics [31, 32]; a similar method has been used to predict catastrophes in dynamical systems [33]. Thus, the SINDy algorithm is an equation-free method [34] to identify a dynamical system from data. This follows a growing trend to exploit sparsity in dynamics [35, 36, 37] and dynamical systems [38, 39, 40]. For simplicity in connecting the SINDy algorithm with dynamic mode decomposition (DMD), we consider discrete-time systems as in Eq. (3), although the algorithm applies equally well to 5 continuous-time systems. In the SINDy algorithm, measurements of the state x of a dynamical system are collected, and these measurements are augmented into a larger vector Θ ( x ) which contains candidate functions _yck_ ( x ) for the right-hand side dynamics F _t_ ( x ) in Eq. (3):   (14)  _._ Θ ( x ) =  _yc_ 1( x ) _yc_ 2( x ) ... _ycm_ ( x ) Often, we will choose the first _n_ functions to be the original state variables, _yck_ ( x ) = _xk_, so that the state x in Θ ( x ). Then, we write the following matrix system of equations: _ξ_ <sup>_T_</sup> ...1 _ξ_ <sup>_T_</sup> _n_ <u></u>   Θ ( x 1) Θ ( x 2) _· · ·_ Θ ( x _M_ ) _._ (15)  Θ ( x 1) Θ ( x 2) _· · ·_ Θ ( x _M_ ) <u></u>      x 2 x 3 _· · ·_ x _M_   = This may be written in matrix short-hand as: X <sup>_′_</sup> = Ξ <sup>_T_</sup> Θ ( X ) _._ (16) The functions in Θ ( x ) are candidate terms in the right hand side dynamics F _t_, and they will also be candidate observable functions. The row vectors _ξ_ <sup>_T_</sup> _k_ <sup>determine which nonlinear terms in</sup> also be candidate observable functions. The row vectors _ξ_ <sup>_T_</sup> _k_ <sup>determine which nonlinear terms in</sup> Θ ( x ) are active in the _k_ -th row of F _t_ ; typically, _ξ_ _k_ will be a sparse vector, since only a few terms are active in the right hand side of many dynamical systems of interest. In this case, we may use sparse regression to solve for each sparse row _ξ_ <sup>_T_</sup> _k_ <sup>.</sup> <sup>Afterward,</sup> <sup>the</sup> <sup>sparse</sup> <sup>matrix</sup> <sup>Ξ</sup> <sup>_T_</sup> <sup>yields</sup> <sup>a</sup> use sparse regression to solve for each sparse row _ξ_ <sup>_T_</sup> _k_ <sup>.</sup> <sup>Afterward,</sup> <sup>the</sup> <sup>sparse</sup> <sup>matrix</sup> <sup>Ξ</sup> <sup>_T_</sup> <sup>yields</sup> <sup>a</sup> nonlinear discrete-time model for Eq. (3), obtained purely from data: x _k_ +1 = Ξ <sup>_T_</sup> Θ ( x _k_ ) _._ (17) With the active terms in the nonlinear dynamics identified as the nonzero entries in the rows of Ξ <sup>_T_</sup>, it is possible to include these functions in the Koopman subspace. Note that in the original SINDy algorithm, the transpose of Eq. (15) was used so that the rows of Ξ become sparse column vectors, establishing a closer resemblance to sparse regression and compressed sensing formulations. Again, either discrete-time or continuous time formulations may be used. After a reduced observable subspace has been identified, we may re-apply the SINDy Algorithm: Θ ref( X <sup>_′_</sup> ) = Ξ <sup>_T_</sup> aug <sup>Θ</sup> <sup>(</sup> <sup>X</sup> <sup>)</sup> (18) where Θ ref is a refined set of candidate observable functions that are active in Eq. (17). The additional rows of Ξ aug determine how these observable functions advance as a linear combination of other observable functions. This procedure may be iterated until the subspace converges. Also, the _ℓ_ 1 sparse regularization may be omitted in these regressions. 3.1.1 Connections to dynamic mode decomposition (DMD) In the case that Θ ( x ) = x, the problem in Eq. (16) reduces to the standard DMD problem: X <sup>_′_</sup> = ΞX _._ (19) In the standard DMD algorithm, a solution Ξ is obtained that minimizes the sum-square error: Ξ = argmin (20) Ξ ˜ _∥_ X <sup>_′_</sup> _−_ ΞX <sup>˜</sup> _∥F,_ where _∥· ∥F_ is the Frobenius norm. This is generally obtained by computing the pseudo-inverse of X using the singular value decomposition (SVD). 6 ### 4 Systems with Koopman-invariant subspaces containing the state Here, we construct a family of nonlinear dynamical systems where it is possible to find a Koopmaninvariant subspace that also includes the original state variables as observable functions. These systems necessarily only have a single isolated fixed point, as there is no finite-dimensional linear system that can represent multiple fixed points or more general attractors. It is, however, possible to obtain linear representations of entire basins of attractions of certain fixed points using eigenfunction coordinates [10, 2], where it may be possible to invert to find the state. However, these are still not global descriptions, and finding these eigenfunctions and inverting to recover the state remains an open challenge for most systems. All of the examples below exhibit polynomial nonlinearities that give rise to polynomial slow or fast manifolds. 4.1 Continuous-time formulation Consider a continuous-time dynamical system with a polynomial slow manifold, given by - _µx_ 1 _λ_ ( _x_ 2 _−_ _P_ ( _x_ 1)) _,_ (21) _<u>d</u>_ _dt_ - _x_ 1� = _x_ 2 where _P_ ( _x_ ) is a polynomial function. If _λ_ _≪|µ|_ _<_ 0, then _x_ 2 = _P_ ( _x_ 1) is an asymptotically attracting slow manifold. This system has a single fixed point at the origin _x_ 1 = _x_ 2 = 0. We will show that there always exists a finite-dimensional linear system that is given by the closure of the Koopman operator on an observable subspace spanned by the states _x_ 1, _x_ 2 and the active polynomial terms in _P_ ( _x_ 1). First, consider a single monomial term given by _P_ ( _x_ ) = _x_ <sup>_N_</sup> . Thus, we would augment the state with an observable function _x_ <sup>_N_</sup>, so that: _x_ 1 _x_ 2 _x_ <sup>_N_</sup> 1    _._ (22)  1 y =  _y_ 1 _y_ 2 _y_ 3   =  Now, the first two terms for _dt_ <sup>_<u>d</u>_</sup> _dt_ <sup>_<u>d</u>_</sup> <sup>_y_</sup> <sup>1</sup> <sup>=</sup> <sup>_µy_</sup> <sup>1</sup> <sup>and</sup> _dt_ <sup>_<u>d</u>_</sup> Now, the first two terms for _dt_ <sup>_<u>d</u>_</sup> <sup>_y_</sup> <sup>1</sup> <sup>=</sup> <sup>_µy_</sup> <sup>1</sup> <sup>and</sup> _dt_ <sup>_<u>d</u>_</sup> <sup>_y_</sup> <sup>2</sup> <sup>=</sup> <sup>_λy_</sup> <sup>2</sup> <sup>_−_</sup> <sup>_λy_</sup> <sup>3</sup> <sup>are linearly related to the entries of</sup> y . Finally, to determine _dt_ <sup>_<u>d</u>_</sup> <sup>_y_</sup> <sup>3, we need only apply the chain rule:</sup> _dt_ <sup>_<u>d</u>_</sup> <sup>_y_</sup> <sup>3, we need only apply the chain rule:</sup> _dtd_ <sup>_y_</sup> <sup>3</sup> <sup>=</sup> _dt_ <sup>_<u>d</u>_</sup> _<u>d</u>_ 1 <sup>_N_</sup> <sup>=</sup> <sup>_Nx_</sup> 1 <sup>_N_</sup> <sup>_−_</sup> <sup>1</sup> _dt_ <sup>_x_</sup> <sup>1</sup> <sup>=</sup> <sup>_µNx_</sup> 1 <sup>_N_</sup> 1 _dt_ <sup>_<u>d</u>_</sup> <sup>_xN_</sup> 1 <sup>_N_</sup> <sup>=</sup> <sup>_µNy_</sup> <sup>3</sup> <sup>_._</sup> (23) This is closely related to Carleman linearization [21, 22, 23]. Thus, the system simplifies as:    _µ_ 0 0 0 _λ_ _−λ_ 0 0 _µN_   _y_ 1 _y_ 2 _y_ 3     =   _._ (24) _<u>d</u>_ _dt_ _y_ 1 _y_ 2 _y_ 3  For more general polynomials, given by _P_ ( _x_ ) = _a_ 1 _x_ <sup>_N_</sup> <sup>1</sup> + _a_ 2 _x_ <sup>_N_</sup> <sup>2</sup> + _· · ·_ + _aM_ _x_ <sup>_NM_</sup>, we have:  _y_ 1   _x_ 1   _y_ 1   _µ_ 0 0 0 0   _y_ 1              _y_ 1 _y_ 2 _y_ 3 _y_ 4    ... _yM_ +2 _y_ 1 _y_ 2 _y_ 3 _y_ 4 _y_ 1 _y_ 2 _y_ 3 _y_ 4  ... _yM_ +2 =  _x_ 1 _x_ 2 _x_ <sup>_N_</sup> 1 <sup>1</sup> _x_ <sup>_N_</sup> <sup>2</sup> 1... _x_ <sup>_N_</sup> 1 <sup>_M_</sup> _<u>d</u>_ = _⇒_ _dt_ =  _µ_ 0 0 0 _· · ·_ 0 0 _λ_ _−a_ 1 _λ_ _−a_ 2 _λ_ _· · ·_ _−aM_ _λ_ 0 0 _µN_ 1 0 _· · ·_ 0 0 0 0 _µN_ 2 _· · ·_ 0 ... ... ... ... ... ... 0 0 0 0 _· · ·_ _µNM_ _._ (25) ... _yM_ +2  1 This expression is finite-dimensional and linear, and it advances the original state x forward exactly, even though the governing dynamics are nonlinear. 7 (a) (b) Slow manifold Nonlinear system Koopman system #### * * Figure 2: Illustration of two examples with a slow manifold . In both cases, _µ_ = _−_ 0 _._ 05 and _λ_ = _−_ 1. Figure 3: Visualization of threedimensional linear Koopman system from Eq. (26) along with projection of dynamics onto the _x_ 1- _x_ 2 plane. The attracting slow manifold is shown in red, the constraint _y_ 3 = _y_ 1 <sup>2</sup> <sup>is shown in blue,</sup> <sup>and the</sup> slow unstable subspace of Eq. (26) is shown in green. Black trajectories of the linear Koopman system in y project onto trajectories of the full nonlinear system in x in the _y_ 1- _y_ 2 plane. Here, _µ_ = _−_ 0 _._ 05 and _λ_ = 1. Figure is reproduced with Code 1. 4.1.1 Continous-time examples Here, we consider two examples with slow manifolds, which are illustrated in Fig. 2. The first system, with quadratic attracting manifold _x_ 2 = _x_ <sup>2</sup> 1 <sup>, is given by:</sup>   _y_ 1 _y_ 2 _y_ 3   _x_ 1 _x_ 2 _x_ <sup>2</sup> 1   _y_ 1 _y_ 2 _y_ 3   _µ_ 0 0 0 _λ_ _−λ_ 0 0 2 _µ_     = 1 _<u>d</u>_ = _⇒_ _dt_  _x_ ˙ 1 = _µx_ 1 _x_ ˙ 2 = _λ_ ( _x_ 2 _−_ _x_ 1 <sup>2</sup> _y_ 1 _y_ 2 _y_ 3   (26) 1 2 for   = 1 <sup>2)</sup>  and the second system, with quartic attracting manifold _x_ 2 = _x_ <sup>4</sup> 1 <sup>_−_</sup> <sup>2</sup> <sup>_x_</sup> 1 <sup>2, is given by:</sup>   _x_ 1 _x_ 2 _x_ <sup>2</sup> 1 _x_ <sup>4</sup> 1   _y_ 1 _y_ 2 _y_ 3 _y_ 4    _µ_ 0 0 0 0 _λ_ 2 _λ_ _−λ_ 0 0 2 _µ_ 0 0 0 0 4 _µ_   _y_ 1 _y_ 2 _y_ 3 _y_ 4   _._ (27)   for 1 _<u>d</u>_ = _⇒_ _dt_ _x_ ˙ 1 = _µx_ 1 _x_ ˙ 2 = _λ_ ( _x_ 2 _−_ _x_ 1 <sup>4</sup>  _y_ 1 _y_ 2 _y_ 3 _y_ 4   =   =   1 <sup>4</sup> <sup>+ 2</sup> <sup>_x_</sup> 1 <sup>2)</sup> To understand the embedding of a nonlinear dynamical system in a higher-dimensional observable subspace, in which the dynamics are linear, consider the system with quadratic attracting manifold from Eq. (26). The full three-dimensional Koopman observable vector space is visualized in Fig. 3. Trajectories that start on the invariant manifold _y_ 3 = _y_ 1 <sup>2, visualized by the blue surface,</sup> are constrained to stay on this manifold. There is a _slow_ subspace, spanned by the eigenvectors 8 corresponding to the slow eigenvalues _µ_ and 2 _µ_ ; this subspace is visualized by the green surface. Finally, there is the original asymptotically attracting manifold of the original system, _y_ 2 = _y_ 1 <sup>2,</sup> which is visualized as the red surface. The blue and red parabolic surfaces always intersect in a parabola that is inclined at a 45 <sup>_◦_</sup> angle in the _y_ 2- _y_ 3 direction. The green surface approaches this 45 <sup>_◦_</sup> inclination as the ratio of fast to slow dynamics become increasingly large. In the full threedimensional Koopman observable space, the dynamics are given by a stable node, with trajectories rapidly attracting onto the green subspace and then slowly approaching the fixed point. 4.1.2 Intrinsic coordinates defined by eigen-observables of the Koopman operator The left eigenvectors of the Koopman operator yield Koopman eigenfunctions (i.e., eigenobservables). The Koopman eigenfunctions of Eq. (26) corresponding to eigenvalues _µ_ and _λ_ are: _<u>λ</u>_ 1 with _b_ = (28) <sup>2</sup> _λ −_ 2 _µ_ <sup>_._</sup> _ϕµ_ = _x_ 1 _,_ and _ϕλ_ = _x_ 2 _−_ _bx_ 1 <sup>2</sup> The constant _b_ in _ϕλ_ captures the fact that for a finite ratio _λ/µ_, the dynamics only shadow the asymptotically attracting slow manifold _x_ 2 = _x_ <sup>2</sup> 1 <sup>,</sup> <sup>but in fact follow neighboring parabolic trajec-</sup> asymptotically attracting slow manifold _x_ 2 = _x_ <sup>2</sup> 1 <sup>,</sup> <sup>but in fact follow neighboring parabolic trajec-</sup> tories. This is illustrated more clearly by the various surfaces in Fig. 3 for different ratios _λ/µ_ . In this way, a set of intrinsic coordinates may be determined from the observable functions defined by the left eigenvectors of the Koopman operator on an invariant subspace. Explicitly, _ϕα_ ( x ) = _ξ_ _α_ y ( x ) _,_ where _ξ_ _α_ K = _α_ _ξ_ _α._ (29) These eigen-observables define observable subspaces that remain invariant under the Koopman operator, even after coordinate transformations. As such, they may be regarded as intrinsic coordinates [28] on the Koopman-invariant subspace. As an example, consider the system from Eq. (26), but written in a coordinate system that is rotated by 45 <sup>_◦_</sup> : _η_ = _x_ + _y_ _η_ = _x_ + _y_ _x_ = ( _η_ + _ξ_ ) _/_ 2 and _ξ_ = _x −_ _y_ _y_ = ( _η −_ _ξ_ ) _/_ 2 _dtd_ <sup>_η_</sup> <sup>=</sup> <sup>_<u>µ</u>_</sup> 2 _dtd_ <sup>_ξ_</sup> <sup>=</sup> <sup>_<u>µ</u>_</sup> 2 <sup>_<u>µ</u>_</sup> 2 <sup>(</sup> <sup>_η_</sup> <sup>+</sup> <sup>_ξ_</sup> <sup>) +</sup> <sup>_<u>λ</u>_</sup> 2 <sup>(</sup> <sup>_η −_</sup> <sup>_ξ_</sup> <sup>)</sup> <sup>_−_</sup> <sup>_<u>λ</u>_</sup> 4 <sup>(</sup> <sup>_η_</sup> <sup>+</sup> <sup>_ξ_</sup> <sup>)2</sup> (30) <sup>_<u>µ</u>_</sup> 2 <sup>(</sup> <sup>_η_</sup> <sup>+</sup> <sup>_ξ_</sup> <sup>)</sup> <sup>_−_</sup> <sup>_<u>λ</u>_</sup> 2 <sup>(</sup> <sup>_η −_</sup> <sup>_ξ_</sup> <sup>) +</sup> <sup>_<u>λ</u>_</sup> 4 <sup>(</sup> <sup>_η_</sup> <sup>+</sup> <sup>_ξ_</sup> <sup>)2</sup> _y_ = ( _η −_ _ξ_ ) _/_ 2 = _⇒_ The original eigenfunctions, written in the new coordinate systems are: _ϕµ_ ( _η, ξ_ ) = <sup>_<u>η</u>_</sup> <sup><u>+</u></sup> <sup>_<u>ξ</u>_</sup> 2 _ϕλ_ ( _η, ξ_ ) = <sup>_<u>η −</u>_</sup> <sup>_<u>ξ</u>_</sup> <u>(</u> _<u>η</u>_ <u>+</u> _<u>ξ</u>_ <u>)</u> <sup>2</sup> _._ 4 <u>(</u> _<u>η</u>_ <u>+</u> _<u>ξ</u>_ <u>)</u> <sup>2</sup> <sup>_<u>−</u>_</sup> <sup>_<u>ξ</u>_</sup> _<u>λ</u>_ 2 _−_ _λ −_ 2 _µ_ It is easy to verify that these remain eigenfunctions: _<u>d</u>_ _<u>η</u>_ <u>˙ +</u> _<u>ξ</u>_ <sup>˙</sup> _dt_ <sup>_ϕµ_</sup> = 2 _<u>d</u>_ = _<u>η</u>_ <u>˙</u> _<u>−</u>_ _<u>ξ</u>_ <sup>˙</sup> _dt_ <sup>_ϕλ_</sup> 2 <u>2(</u> _<u>η</u>_ <u>+</u> _<u>ξ</u>_ <u>)( ˙</u> _<u>η</u>_ <u>+</u> _<u>ξ</u>_ <sup>˙</sup> <u>)</u> 4 <u>+</u> _<u>ξ</u>_ <sup>˙</sup> = _µ_ <sup>_<u>η</u>_</sup> <sup><u>+</u></sup> <sup>_<u>ξ</u>_</sup> 2 2 _<u>λ</u>_ _<u>−</u>_ _<u>ξ</u>_ <sup>˙</sup> 2 _−_ _λ_ _<u>−</u>_ 2 _µ_ <sup><u>+</u></sup> <sup>_<u>ξ</u>_</sup> = _µϕµ_ 2 - _<u>η −</u>_ _<u>ξ</u>_ _<u>λ</u>_ 2 _−_ _λ −_ 2 _µ_ <u>(</u> _<u>η</u>_ <u>+</u> _<u>ξ</u>_ <u>)</u> <sup>2</sup> = _λϕλ._ 4 = _λ_ In fact, in this new coordinate system, it is possible to write the Koopman subspace system:    <u>3</u> _<u>µ</u>_ 2 2 _<u>−</u>_ <u>3</u> _<u>µ</u>_ <sup>_<u>µ</u>_</sup> ( _λ −_ 2 _µ_ ) 2 2 _−_ <sup>_<u>µ</u>_</sup> _−_ ( _λ −_ 2 _µ_ <u>3</u> _<u>µ</u>_ 2 2 _<u>−</u>_ <u>3</u> _<u>µ</u>_ <sup>_<u>µ</u>_</sup>     =   _._ (31) _<u>d</u>_ _dt_ _η_ _ξ_ _ϕλ_  <u>3</u> _<u>µ</u>_ 2 2 _−_ <sup>_<u>µ</u>_</sup> _−_ ( _λ −_ 2 _µ_ ) 0 0 _λ_   _η_ _ξ_ _ϕλ_ 9 4.2 Discrete-time formulation A related formulation for discrete-time systems is given by: - _x_ 1� _x_ 2 _k_ +1 _k_ = - _µ_ 0�� _x_ 1 0 _λ_ _x_ 2 + - 0 _._ (32) (1 _−_ _λ_ ) _P_ ([ _x_ 1] _k_ ) This system will also converge asymptotically to a slow manifold given by _x_ 2 = _P_ ( _x_ 1) when _|λ|_ _≪|µ|_ and _|λ|_ _<_ 1. A similar argument can be made to that given in Eq. (23) and Eq. (25), but with _µ_ <sup>_N_</sup> replacing _Nµ_, since: [ _x_ <sup>_N_</sup> 1 <sup>]</sup> <sup>_k_</sup> <sup>+1</sup> <sup>= ([</sup> <sup>_x_</sup> <sup>1]</sup> <sup>_k_</sup> <sup>+1)</sup> <sup>_N_</sup> <sup>= (</sup> <sup>_µ_</sup> <sup>[</sup> <sup>_x_</sup> <sup>1]</sup> <sup>_k_</sup> <sup>)</sup> <sup>_N_</sup> <sup>=</sup> <sup>_µN_</sup> <sup>[</sup> <sup>_x_</sup> 1 <sup>_N_</sup> <sup>]</sup> <sup>_k._</sup> (33) Thus, for discrete-time systems, the update is given by:      _._   _k_ +1     ... _yM_ +2 _y_ 1 _y_ 2 _y_ 3 _y_ 4 _y_ 1 _y_ 2 _y_ 3 _y_ 4    _y_ 1 _y_ 2 _y_ 3 _y_ 4  ... _yM_ +2  _µ_ 0 0 0 _· · ·_ 0 0 _λ_ _a_ 1(1 _−_ _λ_ ) _a_ 2(1 _−_ _λ_ ) _· · ·_ _aM_ (1 _−_ _λ_ ) 0 0 _µ_ <sup>_N_</sup> 1 0 0 _· · ·_ 0 0 _µ_ <sup>_N_</sup> 1 0 0 _· · ·_ 0 0 0 _µ_ <sup>_N_</sup> 2 0 _· · ·_ 0 0 0 _µ_ <sup>_N_</sup> 2 0 _· · ·_ ... ... ... ... ... ... 0 0 0 0 _µ_ <sup>_N_</sup> _M_ _· · ·_ =  _x_ 1 _x_ 2 _x_ <sup>_N_</sup> 1 <sup>1</sup> _x_ <sup>_N_</sup> <sup>2</sup> 1... _x_ <sup>_N_</sup> 1 <sup>_M_</sup> = _⇒_ =    _k_ _M_ ... _yM_ +2 1 4.2.1 Discrete-time example The case of a polynomial slow manifold is inspired by an example from Tu et al. [19]: - - _λx_ 1 _�→_ 1 _µx_ 2 + ( _λ_ <sup>2</sup> _−_ _µ_ ) _x_ <sup>2</sup> - _x_ 1 _x_ 2 _._ (34) In this case, there is a polynomial stable manifold _x_ 2 = _x_ <sup>2</sup> 1 <sup>.</sup> <sup>Thus,</sup> <sup>they</sup> <sup>suggest</sup> <sup>the</sup> <sup>following</sup> observable variables, which are intrinsic coordinates for the dynamics: _k_ - _y_ 1 _y_ 2 _k_ +1 - _y_ 1� = _y_ 2 - _x_ 1 1 = _⇒_ _x_ 2 _−_ _x_ <sup>2</sup> = - _λ_ 0�� _y_ 1 0 _µ_ _y_ 2 - _λ_ 0 0 _µ_ _._ (35) In our framework above, if the correct intrinsic variables were unknown, they could be discovered by writing the system as:    _x_ 1 _x_ 2 _x_ <sup>2</sup> 1  _y_ 1 _y_ 2 _y_ 3    _y_ 1 _y_ 2 _y_ 3   = 1   _k_  _λ_ 0 0 0 _µ_ ( _λ_ <sup>2</sup> _−_ _µ_ ) 0 0 _λ_ <sup>2</sup>    = _⇒_    _k_ +1 =   _y_ 1 _y_ 2 _y_ 3 _._ (36) Finally, in this observable function coordinate system, the left eigenvectors are:   0 0 1      = _⇒_ _ϕ_ 1( x ) = _x_ 1 _,_ _ξ_ 2 = _ξ_ 1 = 1 0 0 0 1 _−_ 1    = _⇒_ _ϕ_ 2( x ) = _x_ 1 <sup>2</sup> 1 <sup>2</sup> <sup>_,_</sup> _ξ_ 3 =   = _⇒_ _ϕ_ 3( x ) = _x_ 2 _−_ _x_ 1 <sup>2</sup> 1 <sup>2</sup> <sup>(37)</sup> corresponding to the eigenvalues _λ_ 1 = _λ_, _λ_ 2 = _λ_ <sup>2</sup> and _λ_ 3 = _µ_ . These eigenvectors diagonalize the system and define the intrinsic coordinates. 10 ### 5 Koopman operator optimal control A long held hope of Koopman operator theory is that it would provide insights into the control of nonlinear systems. Here, we present results of designing control laws using linear control theory on the truncated Koopman operator; these Koopman operator optimal controllers (KOOCs) then induce a nonlinear controller on the state-space that dramatically outperforms optimal control on the linearized fixed point. This is only a brief introduction to the theory of Koopman optimal control, and there are numerous extensions that must be developed and explored. There are existing connections between DMD and control systems [15], and there are ongoing efforts to extend this to the Koopman operator framework. There are a number of systems where it is not clear how to use the Koopman linear operator for control, and these will be briefly outlined below. In addition, there are alternative nonlinear control methods related to Carleman linearization [24, 25, 26] that may be connected to Koopman operator control. Moreover, we have not yet proven the nonlinear optimality of these new controllers, but the numerical performance is striking. 5.1 Simple motivating example As a motivating example, consider the nonlinear system in Eq. (26), but with the stability of the _x_ 2 direction reversed (i.e., _λ_ = 1 instead of _λ_ = _−_ 1), and modified to include actuation on the second state: + �0� _u,_ (38) 1 - _µ_ 0 0 _λ_ �� _x_ 1 _x_ 2 - - 0 + 1 _−λx_ <sup>2</sup> _<u>d</u>_ _dt_ - _x_ 1� = _x_ 2 with _µ_ = _−._ 1 and _λ_ = 1. Again, this may be put into a Koopman formalism as:   0 1 0 _y_ 1 _y_ 2 _y_ 3  _µ_ 0 0 0 _λ_ _−λ_ 0 0 2 _µ_       +   = _<u>d</u>_ _dt_ _y_ 1 _y_ 2 _y_ 3  _u._ (39)     Now, let us assume that we have a quadratic cost function, as in the linear-quadratic-regulator (LQR) control framework: _J_ = - _∞_ x <sup>_T_</sup> ( _τ_ ) Qx ( _τ_ ) + u ( _τ_ ) <sup>_T_</sup> Ru ( _τ_ ) _dτ,_ (40) 0 where Q weighs the cost of deviations of the state x from the origin and R weighs the cost of control expenditure. For now, we will consider the following Q and R for simplicity: Q = �1 0� _R_ = 1 _._ (41) 0 1 In this way, all state deviations and control expenditures are weighed equally. For linear systems, such as the linearization of Eq. (38), it is possible to derive the matrix C that results in the optimal control law u = _−_ Cx ; this control law is optimal in the sense that it achieves the minimal attainable cost function _J_ . However, this controller will only be optimal for a small vicinity of the fixed point where linearization is valid. Outside this vicinity, when nonlinear terms become large, all guarantees of optimality are lost. Instead of linearizing near the fixed point and computing the optimal LQR controller, here we use the Koopman linear system in Eq. (39). We still have the same cost on the state x, so we use 11 10 5 0 −5 −10 −15 −6 −4 −2 0 x1 10 5 0 −5 −10 −15 0 20 40 t x 105 5 4 3 2 1 0 0 20 40 t Figure 4: Illustration of LQR control around a nonlinear fixed point using standard linearization (black) and truncated Koopman (red). The Koopman optimal controller achieves a much smaller overall cost, _J_, approximately 1 _/_ 3 of the cost of the standard LQR solution. a modified weight matrix Q <sup>˜</sup> given by Q <sup>˜</sup> = - Q 0� and _R_ <sup>˜</sup> = _R_ . In this way, we may develop an 0 0 optimal _linear_ controller for the Koopman representation of our nonlinear system. In this case, the Koopman linear control law, given by _u_ = Cy <sup>˜</sup>, may be interpreted as a nonlinear control law on the original state x : _u_ = _−_ - _K_ ˜ 1 _K_ ˜ 2 - <sup>�</sup> _x_ 1� 1 <sup>_._</sup> (42) _x_ 2 _−_ _K_ <sup>˜</sup> 3 _x_ <sup>2</sup> The results of the standard LQR compared with this Koopman operator optimal controller are shown in Fig. 4, and the Matlab code is provided in Code 2. In this example, the KOOC achieves a cost of approximately 1/3 the cost of standard LQR. 5.2 Limitations of Koopman operator optimal control In the current framework, there are a number of limitations to the approach advocated above. We will illustrate this on a simple variation on the example above, in which _µ_ is unstable instead of _λ_ and the control input effects the first state _x_ 1 instead of _x_ 2: - 0 1 _−λx_ <sup>2</sup> + �1 0 _u,_ (43) �� _µ_ 0�� _x_ 1 0 _λ_ _x_ 2 + _<u>d</u>_ _dt_ - _x_ 1 _x_ 2 with _µ_ = _._ 1 and _λ_ = _−_ 1. In this example, it is necessary to move the actuation to the first state _x_ 1, otherwise this state will be unstable and uncontrollable. What is more troubling, is that the subspace spanned by _x_ 1, _x_ 2, and _x_ <sup>2</sup> 1 <sup>is no longer Koopman-invariant, since the expression for the</sup> subspace spanned by _x_ 1, _x_ 2, and _x_ <sup>2</sup> 1 <sup>is no longer Koopman-invariant, since the expression for the</sup> time derivative of _y_ 3 = _x_ <sup>2</sup> 1 <sup>is more complicated now:</sup> <sup>2</sup> 1 <sup>is more complicated now:</sup> _<u>d</u>_ _<u>d</u>_ _dt_ <sup>_y_</sup> <sup>3</sup> <sup>= 2</sup> <sup>_x_</sup> <sup>1</sup> _dt_ <sup>_x_</sup> <sup>1</sup> <sup>= 2</sup> <sup>_x_</sup> <sup>1 (</sup> <sup>_µx_</sup> <sup>1 +</sup> <sup>_u_</sup> <sup>)</sup> <sup>_._</sup> (44) Thus, there is a troublesome extra nonlinear term _x_ 1 _u_ in the expression for _dt_ <sup>_<u>d</u>_</sup> <sup>_y_</sup> <sup>3.</sup> <sup>However,</sup> <sup>this</sup> may not be too large of a problem, considering that we don’t weight excursions of _y_ 3 in the cost function. What is a larger problem, is that the state _y_ 3 has a positive eigenvalue 2 _µ_, which is uncontrollable. Many off-the-shelf packages, such as Matlab, will fail to return an LQR controller for such uncontrollable unstable systems. 12 ### 6 Discussion In this paper, we have investigated a special choice of Koopman observable functions that form a finite-dimensional subspace of Hilbert space that contains the state in its span and remains invariant under the Koopman operator. Any finite collection of Koopman eigenfunctions (i.e., eigenobservables) forms such a Koopman-invariant subspace. These Koopman eigenfunctions may be extremely useful, providing intrinsic coordinates for a given nonlinear dynamical system. In addition, given such a Koopman-invariant subspace, the Koopman operator restricted to this subspace yields a finite-dimensional linear dynamical system to evolve these observables forward in time. However, it is not always clear how to identify relevant Koopman eigenfunctions, either from data or governing equations, or how to invert these coordinates to obtain information about the progression of the underlying state variables. Moreover, in many cases with control, the control objectives are defined directly on the state; this is the case in linear quadratic regulator (LQR) control, for example. Thus, there is still interest in defining a Koopman invariant subspace that includes the original state variables as observable functions. We demonstrate that for a large class of nonlinear systems with a single isolated fixed point, it is possible to obtain such a Koopman-invariant subspace that includes the original state variables. Moreover, we present a data-driven technique to identify the relevant Koopman observable functions, leveraging a recent technique that identifies nonlinear dynamical systems in a nonlinear function space using sparse regression; this algorithm is known as the sparse identification of nonlinear dynamics (SINDy). We show that the eigen-observables that define this Koopmaninvariant subspace may be solved for as left-eigenvectors of the Koopman operator restricted to the subspace in the chosen coordinate system. Finally, we demonstrate that the finite-dimensional linear Koopman operator defined on this Koopman-invariant subspace may be used to develop Koopman operator optimal control (KOOC) laws using techniques from linear control theory. In particular, we develop an LQR controller using the Koopman linear system, but retaining the cost function defined on the original state. The resulting control law may be thought of as inducing a nonlinear control law on the state variable, and it dramatically outperforms standard LQR computed on a linearization, reducing the cost expended by a factor of three. This is extremely promising and may result in significantly improved control laws for systems with normal form expansions near fixed points [4]. These expansions are commonly used in astrophysical problems to compute orbits around fixed points [41]; for example, the James Webb Space Telescope will orbit the Sun-Earth _L_ 2 Lagrange point [42]. As is often the case with interesting problems in mathematics, a deeper understanding of one problem opens up a host of other open questions. For example, a complete classification of nonlinear systems which admit Koopman-invariant subspaces that include the state variables as observables remains an open and interesting problem. It is, however, clear that no system with multiple fixed points, or any periodic orbits or more complex attractors can admit such a finitedimensional Koopman-invariant subspace containing the state variables explicitly as observables. In these cases, another open problem is how to choose observable coordinates so that a finiterank truncation of the linear Koopman dynamics yields useful results, not just for reconstruction of existing data, but for future state prediction and control. Finally, more effort must go into understanding whether or not Koopman operator optimal control laws are optimal in the sense that they minimize the cost function across all possible nonlinear control laws. Much of the interest surrounding Koopman analysis and DMD has been centered around the promise of obtaining finite-dimensional linear expressions for nonlinear dynamics. In fact, any set of Koopman eigenfunctions span an invariant subspace, where it is possible to obtain an exact and closed finite-dimensional truncation, although finding these nonlinear Koopman eigen 13 observable functions is challenging. Moreover, Koopman invariant subspaces may or may not provide enough information to propagate the underlying state, which is useful for evaluating cost functions in optimal control laws. Koopman eigenfunctions provide a wealth of information about the original system, including a characterization of invariant sets such as stable and unstable manifolds, and these may not have simple closed-form representations, but may instead need to be approximated from data. There are methods that identify almost invariant sets and coherent structures [43, 44] using set oriented methods [45]. Related Ulam-Galerkin methods have been used to approximate eigenvalues and eigenfunctions of the Perron-Frobenius operator [46]. To address these challenges, finite-dimensional linear approximations of the Koopman operator from data have been widely explored, and they are valuable in many instances, especially for extracting dynamics on modal coherent structures. However, we have shown that it is quite rare for a dynamical system to admit a finite-dimensional Koopman-invariant subspace that includes the state variables explicitly, so that exact linear models to propagate the state dynamics exist only for systems with a single isolated fixed point. This implies that approximate truncation of linear Koopman models for nonlinear phenomena with multiple fixed points or more general attractors should be used with care for future-state prediction, especially for off-attractor transients, as well as for the design of control laws. There is no free lunch with Koopman analysis of nonlinear systems, as we trade finite-dimensional nonlinear dynamics for infinite-dimensional linear dynamics, with an entirely new host of challenges. ### Acknowledgements The authors would like to thank Clancy Rowley for insightful and constructive comments on an early draft of this paper, especially his observation that the state can often be recovered from the intrinsic eigenfunction coordinates. We also thank Igor Mezic for making us aware of Carleman linearization and the extremely interesting literature on operator theoretic control of nonlinear systems. SLB acknowledges support from the University of Washington department of Mechanical Engineering and as a Data Science Fellow in the eScience Institute. BWB acknowledges support from the University of Washington department of Biology and as a Data Science Fellow in the eScience Institute. JLP thanks Bill and Melinda Gates for their active support of the Institute of Disease Modeling and their sponsorship through the Global Good Fund. JNK acknowledges support from the U.S. Air Force Office of Scientific Research (FA9550-09-0174). ### References [1] B. O. Koopman. Hamiltonian systems and transformation in hilbert space. _Proceedings of the National_ _Academy of Sciences_, 17(5):315–318, 1931. [2] Matthew O Williams, Ioannis G Kevrekidis, and Clarence W Rowley. A data-driven approximation of the koopman operator: extending dynamic mode decomposition. _Journal of Nonlinear Science_, 2015. [3] S. L. Brunton, J. L. Proctor, and J. N. Kutz. Discovering governing equations from data: Sparse identi fication of nonlinear dynamical systems. _arXiv preprint arXiv:1509.03580_, 2015. [4] Philip Holmes and John Guckenheimer. _Nonlinear_ _oscillations,_ _dynamical_ _systems,_ _and_ _bifurcations_ _of_ _vector fields_, volume 42 of _Applied Mathematical Sciences_ . Springer-Verlag, Berlin, Heidelberg, 1983. [5] BO Koopman and J v Neumann. Dynamical systems of continuous spectra. _Proceedings of the National_ _Academy of Sciences of the United States of America_, 18(3):255, 1932. [6] P. J. Holmes, J. L. Lumley, G. Berkooz, and C. W. Rowley. _Turbulence, coherent structures, dynamical sys-_ _tems and symmetry_ . Cambridge Monographs in Mechanics. Cambridge University Press, Cambridge, England, 2nd edition, 2012. 14 [7] Marko Budiˇsi´c and Igor Mezi´c. Geometry of the ergodic quotient reveals coherent structures in flows. _Physica D: Nonlinear Phenomena_, 241(15):1255–1269, 2012. [8] Igor Mezi´c and Stephen Wiggins. A method for visualization of invariant sets of dynamical systems based on the ergodic partition. _Chaos:_ _An_ _Interdisciplinary_ _Journal_ _of_ _Nonlinear_ _Science_, 9(1):213–218, 1999. [9] Marko Budiˇsi´c and Igor Mezi´c. An approximate parametrization of the ergodic partition using time averaged observables. In _Decision and Control, 2009 held jointly with the 2009 28th Chinese Control Con-_ _ference. CDC/CCC 2009. Proceedings of the 48th IEEE Conference on_, pages 3162–3168. IEEE, 2009. [10] Yueheng Lan and Igor Mezi´c. Linearization in the large of nonlinear systems and koopman operator spectrum. _Physica D: Nonlinear Phenomena_, 242(1):42–53, 2013. [11] Marko Budiˇsi´c, Ryan Mohr, and Igor Mezi´c. Applied koopmanism a). _Chaos:_ _An_ _Interdisciplinary_ _Journal of Nonlinear Science_, 22(4):047510, 2012. [12] Igor Mezic. Analysis of fluid flows via spectral properties of the koopman operator. _Annual Review of_ _Fluid Mechanics_, 45:357–378, 2013. [13] Igor Mezi´c and Andrzej Banaszuk. Comparison of systems with complex behavior. _Physica D: Nonlin-_ _ear Phenomena_, 197(1):101–133, 2004. [14] Igor Mezi´c. Spectral properties of dynamical systems, model reduction and decompositions. _Nonlinear_ _Dynamics_, 41(1-3):309–325, 2005. [15] J. L. Proctor, S. L. Brunton, and J. N. Kutz. Dynamic mode decomposition with control: Using state and input snapshots to discover dynamics. _arxiv_, 2014. [16] P. J. Schmid and J. Sesterhenn. Dynamic mode decomposition of numerical and experimental data. In _61st Annual Meeting of the APS Division of Fluid Dynamics_ . American Physical Society, November 2008. [17] C. W. Rowley, I. Mezi´c, S. Bagheri, P. Schlatter, and D.S. Henningson. Spectral analysis of nonlinear flows. _J. Fluid Mech._, 645:115–127, 2009. [18] P. J. Schmid. Dynamic mode decomposition of numerical and experimental data. _Journal_ _of_ _Fluid_ _Mechanics_, 656:5–28, August 2010. [19] J. H. Tu, C. W. Rowley, D. M. Luchtenburg, S. L. Brunton, and J. N. Kutz. On dynamic mode decom position: theory and applications. _Journal of Computational Dynamics_, 1(2):391–421, 2014. [20] Matthew O Williams, Clarence W Rowley, and Ioannis G Kevrekidis. A kernel approach to data-driven koopman spectral analysis. _arXiv preprint arXiv:1411.2260_, 2014. [21] Torsten Carleman. Application de la th´eorie des ´equations int´egrales lin´eaires aux syst´emes d’´equations diff´erentielles non lin´eaires. _Acta Mathematica_, 59(1):63–87, 1932. [22] W-H Steeb and F Wilhelm. Non-linear autonomous systems of differential equations and carleman linearization procedure. _Journal of Mathematical Analysis and Applications_, 77(2):601–611, 1980. [23] Krzysztof Kowalski, Willi-Hans Steeb, and K Kowalksi. _Nonlinear_ _dynamical_ _systems_ _and_ _Carleman_ _linearization_ . World Scientific, 1991. [24] Roger W Brockett. Volterra series and geometric control theory. _Automatica_, 12(2):167–176, 1976. [25] SP Banks. Infinite-dimensional carleman linearization, the lie series and optimal control of non-linear partial differential equations. _International journal of systems science_, 23(5):663–675, 1992. [26] SA Svoronos, D Papageorgiou, and C Tsiligiannis. Discretization of nonlinear control systems via the carleman linearization. _Chemical engineering science_, 49(19):3263–3267, 1994. [27] R. Abraham, J. E. Marsden, and T. Ratiu. _Manifolds,_ _Tensor_ _Analysis,_ _and_ _Applications_, volume 75 of _Applied Mathematical Sciences_ . Springer-Verlag, 1988. 15 [28] Matthew O Williams, Clarence W Rowley, Igor Mezi´c, and Ioannis G Kevrekidis. Data fusion via in trinsic dynamic variables: An application of data-driven koopman spectral analysis. _EPL (Europhysics_ _Letters)_, 109(4):40007, 2015. [29] R. Tibshirani. Regression shrinkage and selection via the lasso. _J. of the Royal Statistical Society B_, pages 267–288, 1996. [30] John R Koza, Forrest H Bennett III, and Oscar Stiffelman. Genetic programming as a darwinian inven tion machine. In _Genetic Programming_, pages 93–108. Springer, 1999. [31] Josh Bongard and Hod Lipson. Automated reverse engineering of nonlinear dynamical systems. _Pro-_ _ceedings of the National Academy of Sciences_, 104(24):9943–9948, 2007. [32] Michael Schmidt and Hod Lipson. Distilling free-form natural laws from experimental data. _Science_, 324(5923):81–85, 2009. [33] W. X. Wang, R. Yang, Y. C. Lai, V. Kovanis, and C. Grebogi. Predicting catastrophes in nonlinear dynamical systems by compressive sensing. _Physical Review Letters_, 106:154101–1–154101–4, 2011. [34] I. G. Kevrekidis, C. W. Gear, J. M. Hyman, P. G. Kevrekidis, O. Runborg, and C. Theodoropoulos. Equation-free, coarse-grained multiscale computation: Enabling microscopic simulators to perform system-level analysis. _Communications in Mathematical Science_, 1(4):715–762, 2003. [35] Vidvuds Ozolin¸ ˇs, Rongjie Lai, Russel Caflisch, and Stanley Osher. Compressed modes for variational problems in mathematics and physics. _Proceedings_ _of_ _the_ _National_ _Academy_ _of_ _Sciences_, 110(46):18368– 18373, 2013. [36] H. Schaeffer, R. Caflisch, C. D. Hauck, and S. Osher. Sparse dynamics for partial differential equations. _Proceedings of the National Academy of Sciences USA_, 110(17):6634–6639, 2013. [37] Alan Mackey, Hayden Schaeffer, and Stanley Osher. On the compressive spectral method. _Multiscale_ _Modeling &amp; Simulation_, 12(4):1800–1827, 2014. [38] Zhe Bai, Thakshila Wimalajeewa, Zachary Berger, Guannan Wang, Mark Glauser, and Pramod K Varshney. Low-dimensional approach for reconstruction of airfoil data via compressive sensing. _AIAA_ _Journal_, pages 1–14, 2014. [39] J. L. Proctor, S. L. Brunton, B. W. Brunton, and J. N. Kutz. Exploiting sparsity and equation-free archi tectures in complex systems. _The European Physical Journal Special Topics_, 223(13):2665–2684, 2014. [40] S. L. Brunton, J. H. Tu, I. Bright, and J. N. Kutz. Compressive sensing and low-rank libraries for clas sification of bifurcation regimes in nonlinear dynamical systems. _SIAM Journal on Applied Dynamical_ _Systems_, 13(4):1716–1732, 2014. [41] Wang Sang Koon, Martin W Lo, Jerrold E Marsden, and Shane D Ross. Dynamical systems, the three body problem and space mission design. _available online. Accessed_, 21:9, 2008. [42] Jonathan P Gardner, John C Mather, Mark Clampin, Rene Doyon, Matthew A Greenhouse, Heidi B Hammel, John B Hutchings, Peter Jakobsen, Simon J Lilly, Knox S Long, et al. The james webb space telescope. _Space Science Reviews_, 123(4):485–606, 2006. [43] Gary Froyland. Statistically optimal almost-invariant sets. _Physica D: Nonlinear Phenomena_, 200(3):205– 219, 2005. [44] G. Froyland and K. Padberg. Almost-invariant sets and invariant manifolds – connecting probabilistic and geometric descriptions of coherent structures in flows. _Physica D_, 238:1507–1523, 2009. [45] Michael Dellnitz, Gary Froyland, and Oliver Junge. The algorithms behind gaio—set oriented nu merical methods for dynamical systems. In _Ergodic theory, analysis, and efficient simulation of dynamical_ _systems_, pages 145–174. Springer, 2001. [46] Gary Froyland, Georg A Gottwald, and Andy Hammerlindl. A computational method to extract macroscopic variables and their dynamics in multiscale systems. _SIAM_ _Journal_ _on_ _Applied_ _Dynami-_ _cal Systems_, 13(4):1816–1846, 2014. 16 ### Appendix: Systems without Koopman-invariant subspaces that explic- itly span the state For any system with multiple fixed points, periodic orbits, or atrracting/repelling structures, there is no finite-dimensional Koopman invariant subspace that explicitly includes the state. This follows from the fact that these systems cannot be topologically conjugate to a finite-dimensional linear system with a single fixed point. It may, however, be possible to obtain a linearization that is valid in an entire basin of attraction of a single fixed point or periodic orbit of a complex system [10, 2]. Moreover, it may be possible to determine an invariant subspace spanned by Koopman eigenfunctions such that it is possible to invert these eigenfunctions to recover the states. Incorporating eigenfunction-based Koopman optimal control is an important avenue of future research, as it will open up Koopman optimal nonlinear control to a wider class of important problems. 6.1 Example: Logistic map Consider the logistic map, given by: _xk_ +1 = _rxk_ (1 _−_ _xk_ ) _._ (45) Naturally, the observable subspace must include _x_ and _x_ <sup>2</sup> : _k_ _._ (46) y _k_ = - _x_ _x_ ≜ - _xk_ _x_ <sup>2</sup> _k_ Writing out the Koopman operator, the first row equation is simple: _k_ _k_ +1 <u>�</u> - _x_ _x_ <sup>2</sup> y _k_ +1 = - _x_ _x_ <sup>2</sup> = <u>�</u> _<u>r</u>_ _<u>−r</u>_ ? ? _,_ (47) but the second row is not obvious. To find this expression, expand ( _xk_ +1) <sup>2</sup> : _x_ <sup>2</sup> _k_ +1 <sup>= (</sup> <sup>_rxk_</sup> <sup>(1</sup> <sup>_−_</sup> <sup>_xk_</sup> <sup>))2</sup> <sup>=</sup> <sup>_r_</sup> <sup>2 �</sup> <sup>2</sup> _k_ <sup>_−_</sup> <sup>2</sup> <sup>_x_</sup> _k_ <sup>3</sup> _x_ <sup>2</sup> _k_ _k_ <sup>3</sup> <sup>+</sup> <sup>_x_</sup> _k_ <sup>4</sup> _k_ - _._ (48) Thus, we also need cubic and quartic polynomial terms to advance _x_ <sup>2</sup> . Similarly, these terms need polynomials up to sixth and eighth order, respectively, and so on, ad infinitum: _x_ _x_ <sup>2</sup> _x_ <sup>3</sup> _x_ <sup>4</sup> _x_ <sup>5</sup> _x_ <sup>6</sup> _x_ <sup>7</sup> _x_ <sup>8</sup> _x_ <sup>9</sup> _x_ <sup>10</sup>  _x_   _r_ 0 0 0 0 0 0 0 0    _x_ _x_ <sup>2</sup> _x_ <sup>3</sup> _x_ <sup>4</sup> _x_ <sup>5</sup>   _k_ +1   _k_  ...   _x_ _x_ <sup>2</sup> _x_ <sup>3</sup> _x_ <sup>4</sup> _x_ <sup>5</sup> ... =  _r_ _−r_ 0 0 0 0 0 0 0 0 _· · ·_ 0 _r_ <sup>2</sup> _−_ 2 _r_ <sup>2</sup> _r_ <sup>2</sup> 0 0 0 0 0 0 _· · ·_ 0 0 _r_ <sup>3</sup> _−_ 3 _r_ <sup>3</sup> 3 _r_ <sup>3</sup> _r_ <sup>3</sup> 0 0 0 0 _· · ·_ 0 0 0 _r_ <sup>4</sup> _−_ 4 _r_ <sup>4</sup> 6 _r_ <sup>4</sup> _−_ 4 _r_ <sup>4</sup> _r_ <sup>4</sup> 0 0 _· · ·_ 0 0 0 0 _r_ <sup>5</sup> _−_ 5 _r_ <sup>5</sup> 10 _r_ <sup>5</sup> _−_ 10 _r_ <sup>5</sup> 5 _r_ <sup>5</sup> _−r_ <sup>5</sup> _· · ·_ ... ... ... ... ... ... ... ... ... ... ... _._ (49) It is interesting to note that the rows of this equation are related to the rows of Pascal’s triangle, with the _n_ -th row scaled by _r_ <sup>_n_</sup>, and with the omission of the first row: - _x_ 0� _k_ +1 <sup>=</sup> - _r_ 0�� _x_ 0� _k_ <sup>_._</sup> (50) The representation of the Koopman operator in a polynomial basis is somewhat troubling. Not only is there no closure, but the determinant of any finite-rank truncation is very large for _r_ _>_ 1. This illustrates a pitfall associated with naive representation of the infinite dimensional Koopman operator for a simple chaotic system. Truncating the system, or performing a least squares fit on an augmented observable vector (i.e., DMD on a nonlinear measurement) yields poor results, with the truncated system only agreeing with the true dynamics for a small handful of iterations. 17 6.2 Example: Nonlinear fixed point with a center manifold Consider the simple nonlinear system with a single isolated fixed point at the origin: _<u>d</u>_ _dt_ <sup>_x_</sup> <sup>=</sup> <sup>_x_</sup> <sup>2</sup> <sup>_._</sup> (51) The Carleman linearization approach above would suggest that we augment the observable subspace with the quadratic polynomial _y_ 2 = _x_ <sup>2</sup>, so that: - _y_ 1 _y_ 2 = - _x_ _x_ <sup>2</sup> _._ (52) However, the expression for the time-derivative of _y_ 2 requires higher polynomials in _x_ : _<u>d</u>_ _dt_ <sup>_y_</sup> <sup>2</sup> <sup>= 2</sup> <sup>_xx_</sup> <sup>˙</sup> <sup>= 2</sup> <sup>_x_</sup> <sup>3</sup> <sup>_._</sup> (53) Similarly, if we introduce _y_ 3 = _x_ <sup>3</sup>, then _dt_ <sup>_<u>d</u>_</sup> <sup>_y_</sup> <sup>3</sup> <sup>=</sup> <sup>3</sup> <sup>_x_</sup> <sup>2 ˙</sup> <sup>_x_</sup> <sup>=</sup> <sup>3</sup> <sup>_x_</sup> <sup>4, and so on.</sup> <sup>This results in an infinite Koopman</sup> expansion:         ... ...  _y_ 1 _y_ 2 _y_ 3 _y_ 4 ...  ... _<u>d</u>_ _dt_  _y_ 1 _y_ 2 _y_ 3 _y_ 4  _x_ _x_ <sup>2</sup> _x_ <sup>3</sup> _x_ <sup>4</sup> _._ (54) =  0 1 0 0 _· · ·_ 0 0 2 0 _· · ·_ 0 0 0 3 _· · ·_ 0 0 0 0 _· · ·_ ... ... ... ... ... where  _y_ 1 _y_ 2 _y_ 3 _y_ 4 =       Note that the determinant of any finite-rank truncation of the Koopman operator is 0, even though the system has finite-time blow up! For this problem, it is possible to use eigenfunction coordinates to obtain a linear model in terms of an eigenfunction that may be inverted to recover the state <sup>1</sup> : _<u>d</u>_ _ϕ_ ( _x_ ) = _e_ <sup>_−_</sup> <sup>1</sup> <sup>_/x_</sup> (55) = _⇒_ _dt_ <sup>_ϕ_</sup> <sup>(</sup> <sup>_x_</sup> <sup>) =</sup> <sup>_x−_</sup> <sup>2</sup> <sup>_e−_</sup> <sup>1</sup> <sup>_/x_</sup> <sup>˙</sup> <sup>_x_</sup> <sup>=</sup> <sup>_ϕ_</sup> <sup>(</sup> <sup>_x_</sup> <sup>)</sup> <sup>_._</sup> Identifying eigenfunctions from data and using these linear models for control is a high-priority future direction. 0.05 0.04 0.03 0.02 0.01 Full System r=1 <u>r=2</u> r=3 r=4 <u>r=5</u> r=6 r=7 r=8 ~~r=9~~ <u>r=10</u> 0 0 10 20 30 40 50 60 70 80 t Figure 5: Illustration of Koopman linear system from Eq. (54) converging towards true solution as the rank of the truncation _r_ is increased. 1From a personal communication with C. W. Rowley. 18 Code 1: Koopman linear system corresponding to Fig. 3. <mark>clear</mark> <mark>all</mark> <mark>,</mark> <mark>close</mark> <mark>all</mark> <mark>,</mark> <mark>clc</mark> _<mark>%%</mark>_ _<mark>System</mark>_ <mark>mu</mark> <mark>=</mark> <mark>-.05;</mark> <mark>lambda</mark> <mark>=</mark> <mark>-1;</mark> <mark>A</mark> <mark>=</mark> <mark>[mu</mark> <mark>0</mark> <mark>0;</mark> <mark>0</mark> <mark>lambda</mark> <mark>-lambda;</mark> <mark>0</mark> <mark>0</mark> <mark>2*mu];</mark> _<mark>%</mark>_ _<mark>Koopman</mark>_ _<mark>linear</mark>_ _<mark>dynamics</mark>_ <mark>[T,D]</mark> <mark>=</mark> <mark>eig</mark> <mark>(A);</mark> <mark>slope_stab_man</mark> <mark>=</mark> <mark>T(3,3)/T(2,3);</mark> _<mark>%</mark>_ _<mark>slope</mark>_ _<mark>of</mark>_ _<mark>stable</mark>_ _<mark>subspace</mark>_ _<mark>(green)</mark>_ _<mark>%%</mark>_ _<mark>Integrate</mark>_ _<mark>Koopman</mark>_ _<mark>trajectories</mark>_ <mark>y0A</mark> <mark>=</mark> <mark>[1.5;</mark> <mark>-1;</mark> <mark>2.25];</mark> <mark>y0B</mark> <mark>=</mark> <mark>[1;</mark> <mark>-1;</mark> <mark>1];</mark> <mark>y0C</mark> <mark>=</mark> <mark>[2;</mark> <mark>-1;</mark> <mark>4];</mark> <mark>tspan</mark> <mark>=</mark> <mark>0:.01:1000;</mark> <mark>[t,yA]</mark> <mark>=</mark> <mark>ode45</mark> <mark>(@(t,y)A*y,tspan,y0A);</mark> <mark>[t,yB]</mark> <mark>=</mark> <mark>ode45</mark> <mark>(@(t,y)A*y,tspan,y0B);</mark> <mark>[t,yC]</mark> <mark>=</mark> <mark>ode45</mark> <mark>(@(t,y)A*y,tspan,y0C);</mark> _<mark>%%</mark>_ _<mark>Plot</mark>_ _<mark>invariant</mark>_ _<mark>surfaces</mark>_ _<mark>%</mark>_ _<mark>Attracting</mark>_ _<mark>manifold</mark>_ _<mark>$y_2=y_1ˆ2$</mark>_ _<mark>(red</mark>_ _<mark>manifold)</mark>_ <mark>[X,Z]</mark> <mark>=</mark> <mark>meshgrid</mark> <mark>(-2:.01:2,-1:.01:4);</mark> <mark>Y</mark> <mark>=</mark> <mark>X.ˆ2;</mark> <mark>surf</mark> <mark>(X,Y,Z,’EdgeColor’,’None’,’FaceColor’,’r’,’FaceAlpha’,.1)</mark> <mark>hold</mark> <mark>on,</mark> <mark>grid</mark> <mark>on,</mark> <mark>view</mark> <mark>(-15,8),</mark> <mark>lighting</mark> <mark>gouraud</mark> _<mark>%</mark>_ _<mark>Invariant</mark>_ _<mark>set</mark>_ _<mark>$y_3=y_1ˆ2$</mark>_ _<mark>(blue</mark>_ _<mark>manifold)</mark>_ <mark>[X1,Y1]</mark> <mark>=</mark> <mark>meshgrid</mark> <mark>(-2:.01:2,-1:.01:4);</mark> <mark>Z1</mark> <mark>=</mark> <mark>X1.ˆ2;</mark> <mark>surf</mark> <mark>(X1,Y1,Z1,’EdgeColor’,’None’,’FaceColor’,’b’,’FaceAlpha’,.1)</mark> _<mark>%</mark>_ _<mark>Stable</mark>_ _<mark>invariant</mark>_ _<mark>subspace</mark>_ _<mark>of</mark>_ _<mark>Koopman</mark>_ _<mark>linear</mark>_ _<mark>system</mark>_ _<mark>(green</mark>_ _<mark>plane)</mark>_ <mark>[X2,Y2]=</mark> <mark>meshgrid</mark> <mark>(-2:0.01:2,0:.01:4);</mark> <mark>Z2</mark> <mark>=</mark> <mark>slope_stab_man*Y2;</mark> _<mark>%</mark>_ _<mark>for</mark>_ _<mark>mu=-.2</mark>_ <mark>surf</mark> <mark>(X2,Y2,Z2,’EdgeColor’,’None’,’FaceColor’,[.3</mark> <mark>.7</mark> <mark>.3],’FaceAlpha’,.7)</mark> <mark>x</mark> <mark>=</mark> <mark>-2:.01:2;</mark> _<mark>%</mark>_ _<mark>intersection</mark>_ _<mark>of</mark>_ _<mark>green</mark>_ _<mark>and</mark>_ _<mark>blue</mark>_ _<mark>surfaces</mark>_ _<mark>(below)</mark>_ <mark>plot3</mark> <mark>(x,(1/slope_stab_man)*x.ˆ2,x.ˆ2,’-g’,’LineWidth’,2)</mark> _<mark>%</mark>_ _<mark>intersection</mark>_ _<mark>of</mark>_ _<mark>red</mark>_ _<mark>and</mark>_ _<mark>blue</mark>_ _<mark>surfaces</mark>_ _<mark>(below)</mark>_ <mark>plot3</mark> <mark>(x,x.ˆ2,x.ˆ2,’--r’,’LineWidth’,2)</mark> <mark>plot3</mark> <mark>(x,x.ˆ2,-1+0*x,’r--’,’LineWidth’,2);</mark> _<mark>%%</mark>_ _<mark>Plot</mark>_ _<mark>Koopman</mark>_ _<mark>Trajectories</mark>_ _<mark>(from</mark>_ _<mark>lines</mark>_ _<mark>15-17)</mark>_ <mark>plot3</mark> <mark>(yA(:,1),yA(:,2),-1+0*yA,’k-’,’LineWidth’,1);</mark> <mark>plot3</mark> <mark>(yB(:,1),yB(:,2),-1+0*yB,’k-’,’LineWidth’,1);</mark> <mark>plot3</mark> <mark>(yC(:,1),yC(:,2),-1+0*yC,’k-’,’LineWidth’,1);</mark> <mark>plot3</mark> <mark>(yA(:,1),yA(:,2),yA(:,3),’k’,’LineWidth’,1.5)</mark> <mark>plot3</mark> <mark>(yB(:,1),yB(:,2),yB(:,3),’k’,’LineWidth’,1.5)</mark> <mark>plot3</mark> <mark>(yC(:,1),yC(:,2),yC(:,3),’k’,’LineWidth’,1.5)</mark> <mark>plot3</mark> <mark>([0</mark> <mark>0],[0</mark> <mark>0],[0</mark> <mark>-1],’ko’,’LineWidth’,4)</mark> <mark>set</mark> <mark>(</mark> <mark>gca</mark> <mark>,’ztick’,[0</mark> <mark>1</mark> <mark>2</mark> <mark>3</mark> <mark>4</mark> <mark>5])</mark> <mark>axis</mark> <mark>([-4</mark> <mark>4</mark> <mark>-1</mark> <mark>4</mark> <mark>-1</mark> <mark>4])</mark> <mark>xlabel</mark> <mark>(’y_1’),</mark> <mark>ylabel</mark> <mark>(’y_2’),</mark> <mark>zlabel</mark> <mark>(’y_3’);</mark> 19 Code 2: Koopman operator optimal control (KOOC) example corresponding to Fig. 4. <mark>clear</mark> <mark>all</mark> <mark>,</mark> <mark>close</mark> <mark>all</mark> <mark>,</mark> <mark>clc</mark> <mark>mu</mark> <mark>=</mark> <mark>-.1;</mark> <mark>lambda</mark> <mark>=</mark> <mark>1;</mark> <mark>tspan</mark> <mark>=</mark> <mark>0:.01:50;</mark> <mark>x0</mark> <mark>=</mark> <mark>[-5;</mark> <mark>5];</mark> _<mark>%</mark>_ _<mark>LQR</mark>_ _<mark>on</mark>_ _<mark>linearized</mark>_ _<mark>system</mark>_ <mark>A</mark> <mark>=</mark> <mark>[-.1</mark> <mark>0;</mark> <mark>0</mark> <mark>1];</mark> <mark>B</mark> <mark>=</mark> <mark>[0;</mark> <mark>1];</mark> <mark>Q</mark> <mark>=</mark> <mark>eye</mark> <mark>(2);</mark> <mark>R</mark> <mark>=</mark> <mark>1;</mark> <mark>C</mark> <mark>=</mark> <mark>lqr(A,B,Q,R);</mark> <mark>vf</mark> <mark>=</mark> <mark>@(t,x)</mark> <mark>A*x</mark> <mark>+</mark> <mark>[0;</mark> <mark>-lambda*x(1)ˆ2]</mark> <mark>-</mark> <mark>B*C*x;</mark> <mark>[t,xLQR]</mark> <mark>=</mark> <mark>ode45</mark> <mark>(vf,tspan,x0);</mark> _<mark>%</mark>_ _<mark>Koopman</mark>_ _<mark>operator</mark>_ _<mark>optimal</mark>_ _<mark>control</mark>_ _<mark>(KOOC);</mark>_ _<mark>i.e.,</mark>_ _<mark>LQR</mark>_ _<mark>on</mark>_ _<mark>Koopman</mark>_ _<mark>operator</mark>_ <mark>A2</mark> <mark>=</mark> <mark>[mu</mark> <mark>0</mark> <mark>0;</mark> <mark>0</mark> <mark>lambda</mark> <mark>-lambda;</mark> <mark>0</mark> <mark>0</mark> <mark>2*mu];</mark> <mark>B2</mark> <mark>=</mark> <mark>[0;</mark> <mark>1;</mark> <mark>0];</mark> <mark>Q2</mark> <mark>=</mark> <mark>[1</mark> <mark>0</mark> <mark>0;</mark> <mark>0</mark> <mark>1</mark> <mark>0;</mark> <mark>0</mark> <mark>0</mark> <mark>0];</mark> <mark>R</mark> <mark>=</mark> <mark>1;</mark> <mark>C2</mark> <mark>=</mark> <mark>lqr(A2,B2,Q2,R);</mark> _<mark>%</mark>_ _<mark>note</mark>_ _<mark>that</mark>_ _<mark>controller</mark>_ _<mark>is</mark>_ _<mark>nonlinear</mark>_ _<mark>in</mark>_ _<mark>the</mark>_ _<mark>state</mark>_ _<mark>’x’</mark>_ <mark>vf2</mark> <mark>=</mark> <mark>@(t,x)</mark> <mark>A*x</mark> <mark>+</mark> <mark>[0;</mark> <mark>-lambda*x(1)ˆ2]</mark> <mark>-</mark> <mark>B*C2(1:2)*x</mark> <mark>+</mark> <mark>[0;</mark> <mark>-C2(3)*x(1)ˆ2];</mark> <mark>[t,xKOOC]</mark> <mark>=</mark> <mark>ode45</mark> <mark>(vf2,tspan,x0);</mark> _<mark>%%</mark>_ _<mark>Plot</mark>_ <mark>figure</mark> <mark>(1)</mark> <mark>subplot</mark> <mark>(1,3,1)</mark> <mark>plot</mark> <mark>(xLQR(:,1),xLQR(:,2),’k’,’LineWidth’,1.2);</mark> <mark>hold</mark> <mark>on,</mark> <mark>grid</mark> <mark>on</mark> <mark>plot</mark> <mark>(xKOOC(1:50:</mark> <mark>end</mark> <mark>,1),xKOOC(1:50:</mark> <mark>end</mark> <mark>,2),’r--’,’LineWidth’,1.2);</mark> <mark>xlabel</mark> <mark>(’x_1’),</mark> <mark>ylabel</mark> <mark>(’x_2’)</mark> <mark>subplot</mark> <mark>(1,3,2)</mark> <mark>plot</mark> <mark>(tspan,xLQR,’k’,’LineWidth’,1.2);</mark> <mark>hold</mark> <mark>on,</mark> <mark>grid</mark> <mark>on</mark> <mark>plot</mark> <mark>(tspan,xKOOC,’r--’,’LineWidth’,1.2);</mark> <mark>xlabel</mark> <mark>(’t’),</mark> <mark>ylabel</mark> <mark>(’x_k’)</mark> <mark>xlim([0</mark> <mark>50])</mark> <mark>JLQR</mark> <mark>=</mark> <mark>cumsum</mark> <mark>(xLQR(:,1).ˆ2</mark> <mark>+</mark> <mark>xLQR(:,2).ˆ2</mark> <mark>+</mark> <mark>(C*xLQR’)’.ˆ2)’;</mark> <mark>JKOOC</mark> <mark>=</mark> <mark>cumsum</mark> <mark>(xKOOC(:,1).ˆ2</mark> <mark>+</mark> <mark>xKOOC(:,2).ˆ2</mark> <mark>+</mark> <mark>(C*xKOOC’)’.ˆ2)’;</mark> <mark>subplot</mark> <mark>(1,3,3)</mark> <mark>plot</mark> <mark>(tspan,JLQR,’k’,’LineWidth’,1.2);</mark> <mark>hold</mark> <mark>on,</mark> <mark>grid</mark> <mark>on</mark> <mark>plot</mark> <mark>(tspan,JKOOC,’r--’,’LineWidth’,1.2);</mark> <mark>xlabel</mark> <mark>(’t’),</mark> <mark>ylabel</mark> <mark>(’J’)</mark> <mark>axis</mark> <mark>([0</mark> <mark>50</mark> <mark>0</mark> <mark>500000])</mark> <mark>legend</mark> <mark>(’LQR’,’Koopman</mark> <mark>optimal</mark> <mark>control’)</mark> 20

섹션 본문

섹션 본문이 없습니다.

참고문헌

참고문헌 정보가 없습니다.