Koopman Form of Nonlinear Systems with Inputs

The Koopman framework proposes a linear representation of finite-dimensional nonlinear systems through a generally infinite-dimensional globally linear embedding. Originally, the Koopman formalism has been derived for autonomous systems. In applications for systems with inputs, generally a linear time invariant (LTI) form of the Koopman model is assumed, as it facilitates the use of control techniques such as linear quadratic regulation and model predictive control. However, it can be easily shown that this assumption is insufficient to capture the dynamics of the underlying nonlinear system. Proper theoretical extension for actuated continuous-time systems with a linear or a control-affine input has been worked out only recently, however extensions to discrete-time systems and general continuous-time systems have not been developed yet. In the present paper, we systematically investigate and analytically derive lifted forms under inputs for a rather wide class of nonlinear systems in both continuous and discrete time. We prove that the resulting lifted representations give Koopman models where the state transition is linear, but the input matrix becomes state-dependent (state and input-dependent in the discrete-time case), giving rise to a specially structured linear parameter-varying (LPV) description of the underlying system. We also provide error bounds on how much the dependency of the input matrix contributes to the resulting representation and how well the system behaviour can be approximated by an LTI Koopman representation. The introduced theoretical insight greatly helps for performing proper model structure selection in system identification with Koopman models as well as making a proper choice for LTI or LPV techniques for the control of nonlinear systems through the Koopman approach.


Introduction
Nowadays, most dynamic systems exhibit nonlinear behaviour that needs to be handled to meet the ever increasing performance requirements.Nonlinear control techniques, e.g.backstepping, control Lyapunov functions [7], [9], are complex and generally only provide stability guarantees.In contrast, the control methods developed for linear systems offer strong guarantees on performance and easy to use design principles.However, using linearized models allows only limited performance, as they are only valid locally.For this reason, in This work has received funding from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation programme (grant agreement nr.714663).This research has also been supported by the Ministry of Innovation and Technology (NRDI) Office within the framework of the Autonomous Systems National Laboratory Program.The corresponding author is Lucian C. Iacob.
Email addresses: l.c.iacob@tue.nl(Lucian C. Iacob), r.toth@tue.nl(Roland Tóth), m.schoukens@tue.nl(Maarten Schoukens).recent years, there has been a significant research interest on embedding nonlinear systems into linear models.A possible way to achieve this is through the Koopman framework [11] that proposes a trade off in complexity by representing a nonlinear system through a generally infinite dimensional, but linear description.By applying a nonlinear state transformation through so-called observable functions, the states are projected into a higher dimensional space where their dynamic relation can be expressed as a linear mapping.While the framework is well worked out for autonomous systems, treating systems with inputs is not understood well.
In the continuous-time case, for input linear or control affine nonlinear systems, applying the chain rule of differentiation leads to linear state-varying Koopman models [8].More specifically, using state-dependent observables results in a constant state-transition matrix, but a statevarying input matrix.Hence, the Koopman form can be interpreted as a linear parameter-varying (LPV) model.Furthermore, if the resulting input matrix function is in the span of the observables, the resulting Koopman model associated with a nonlinear control affine system can be written in a bilinear form [5], [6].How to systematically obtain Koopman forms suitable for control of general nonlinear systems with input is still an open question even for continuous-time systems.For example, the authors of [10] consider a finite set of discrete input values and derive a family of Koopman generators which are defined at constant input values.This results in a switched linear system and the control approach aims to optimize the switching sequence.Alternatively, one could consider the Koopman operator acting on an extended state-input space [8].However, the resulting lifted model is autonomous in the extended state and the construction is difficult to be used for control purposes.As such, the current available methods to derive an associated Koopman form of nonlinear systems with input in a general form offer limited control possibilities.
In discrete time, the derivation of Koopman models is not as straightforward even for linear input and control affine nonlinear systems due to the lack of the chain rule for the difference operator.However, for system identification and embedded control purposes, the discrete-time models are predominantly used.In the literature, there are several different methods that treat discrete-time nonlinear systems with inputs.For example, the authors of [23] suggest to identify an autonomous LPV Koopman model with the input representing the scheduling variable.A more commonly used approach is detailed in the work of [20], which uses a dictionary of state, input and mixed-dependent observables.While the representation is autonomous, it is common to restrict the output space of the Koopman operator to observables only dependent on the state.This idea has been used mostly in identification-related works, e.g.[3], [14], and works that investigate the relation of system theoretic properties between the Koopman form and the original nonlinear representation, such as [24].Furthermore, the input might also be projected through the nonlinear lifting, which endangers controllability.Despite these theoretical considerations and due to its simplicity, a linear time invariant (LTI) Kooman model with nonlifted input is generally used in practice, especially with control methods such as linear quadratic regulation (LQR) and model predictive control (MPC), [12], [15], [18].However, there is no discussion on the validity of these models or on the approximation error that is introduced.Furthermore, as we show in this paper, the involved approximation error can be substantial.
The present paper investigates the analytic derivation of Koopman forms of general nonlinear systems with inputs both in continuous and discrete time.The contributions can be summarized as follows.
• A systematic factorization method based on the fundamental theorem of calculus (FTC) is devised to obtain a lifted continuous-time Koopman model suitable for control purposes.• A method to analytically compute the associated Koopman form of nonlinear systems in discrete time is developed.
• Interpretation of the lifted forms as LPV Koopman models for both continuous and discrete-time systems.• A 2-norm based magnitude bound of the error between the exact Koopman model and a given LTI approximation is devised to give a useful characterization of the expected model uncertainty.
The paper is structured as follows.Section 2 gives an introduction to Koopman forms in continuous time and presents our first contribution in terms of a general approach for obtaining Koopman representations under inputs.In Section 3, we further extend our results for the Koopman framework to discrete-time systems, which is the main contribution of our work.In Section 4, we describe a 2-norm error bound to characterize how well the system behaviour can be captured using an approximated (LTI) Koopman model.Next, in Section 5, we apply our proposed approach on nonlinear systems both in continuous and discrete time in terms of embedding them in Koopman forms, demonstrating the utilization potential of the developed theory.Additionally, we provide a detailed comparison between the resulting Koopman form in discrete time and its approximation in terms of a fully LTI Koopman model, also showing the applicability of the derived error bound.Finally, in Section 6, conclusions on the presented results are drawn.

Embedding of continuous-time systems
The present section briefly details the embedding of autonomous continuous-time nonlinear systems into Koopman forms, followed by the extension of the embedding under inputs.Additionally, we propose a factorization method to describe the resulting Koopman models in terms of an LPV model useful for control.

Koopman form of autonomous systems
First, consider a continuous-time, autonomous nonlinear system: is the state variable and t ∈ R denotes the continuous time.The solution x t of (1) at time t starting from an initial condition x 0 can be described by the induced flow: It is considered that X is compact and forward invariant under F c (t, •), i.e.F c (t, X) ⊆ X, ∀t ≥ 0 (assuming a weak form of stability).The Koopman family of operators K t t≥0 associated with F c (t, •) and a given F ⊆ C 1 (continuously differentiable) Banach function space is defined as the composition: where φ : X → R denotes scalar observable functions of class C 1 with φ ∈ F. As shown in [17], the family {K t } t≥0 is a (one parameter) semigroup and characterizes the linear embedding of (1) in terms of the observables φ ∈ F. Furthermore, as X is a compact forward-invariant set and the flow F c is uniformly Lipshitz continuous w.r.t.t, the Koopman semigroup {K t } t≥0 is strongly continuous on F [17].Hence, the infinitesimal generator L : D L → F of the Koopman semigroup of operators is defined as [13], [17]: where the domain D L ⊆ F is a dense set in F and the limit (4) exists in the strong sense [13]: with • being the norm associated with F [17].In continuous time, the notion of the infinitesimal generator is important, as it is used to describe the dynamics in the lifted space of observables.As shown in [4], if the previous assumptions hold true, then the generator L is linear.Let z φ (t) := K t φ(x 0 ).Then, z φ (t) is the solution of the equation: żφ = Lz φ , (6) with initial condition z φ (0) = φ(x 0 ) [1].Solving the initial value problem (6) results in the relation: As described in [1], [2], the application of the generator L on the observable φ(x t ) gives: which defines a linear, but infinite dimensional representation of the underlying system.In this paper, we consider that there exists a finite dimensional Koopman invariant subspace F n f ⊆ D L (the image of the generator L is in F n f ).As shown in [1], if F n f is invariant under the Koopman generator L, then, due to the linearity of L, Lφ is a linear combination of the elements of to be a basis of F n f .Following the derivations in [17] for the Koopman operator, the effect of the infinitesimal generator on a component φ j can be described as: where L is a matrix representation of the Koopman generator and the j th column of L contains the coordinates of Lφ j in the basis Φ.By introducing A = L ∈ R n f ×n f , the lifted dynamics of (1) can be written as: Based on (8), the following relation also holds true: where ∂Φ ∂x is the Jacobian of Φ.Hence, the condition for the nonlinear system (1) to have a finite dimensional Koopman embedding (i.e.lifting) is to find a set of observables Φ for which: In order to recover the original states, we assume there exists a back transformation Φ † (Φ(x t )) = x t .In practice, this is often achieved by either including the states as part of the observables or by requiring that they are in the span of the observables.
Finally, to explicitly give the LTI dynamics implied by the Koopman form, introduce z t = Φ(x t ), which gives the Koopman representation of (1) as:

Koopman form under inputs
The following section treats the derivation of the Koopman form for systems with input.The approach is based on a sequential method that uses state-dependent observables, as done in [8], [21], for control affine systems and in [21] for nonlinear systems in general form.As a new result, for general nonlinear systems, we describe a factorization method to obtain a model useful for control.Furthermore, we interpret the resulting lifted forms as LPV Koopman models.

General nonlinear systems
Consider the general representation: with It is assumed that U is given such that X is compact and forward invariant under the induced flow.As there is no separation between the autonomous and input-driven dynamics, the problem of finding a Koopman representation is difficult.In order to avoid ending up with a Koopman model of ( 14) without inputs and losing controllability, we use a construction based on only statedependent observables.First, we decompose the function f c (x t , u t ) into the sum between the contributions of the autonomous and input-related dynamics: with g c (x t , 0) = 0.This decomposition idea is described in [21], but it is not formalized as a theorem with a proof.We next give the analytically derived Koopman form associated with (14).
Theorem 1 Given a nolinear continuous-time system in the general form (14) where f c is decomposed as (15), together with a lifting Φ : )) ∈ span {Φ}, then there exists an exact finite dimensional lifted form given by: with A ∈ R n f ×n f and B : R nx × U → R n f defined as: Proof The first step is to lift the autonomous dynamics, giving the following finite dimensional lifted representation form: Next, for u t = 0, the dynamics are described by (15).
Taking the time derivative of the lifting Φ and applying the chain rule gives the relation: with B given by (17).
Eq. ( 16) represents an exact lifted form of ( 14), consistent with the lifting in (18) under Φ.Note that the input enters through the nonlinear function B(x t , u t ), which limits the application of ( 16) for control purposes.To address this, we can recast the representation into a socalled LPV form by the help of the following Lemma: Lemma 1 Let B : R nx ×U → R n f be continuously differentiable in u t , continuous in x t and satisfying B(x t , 0) = 0, and let U be a convex set containing the origin.Then: This provides a factorization of B such that B(x t , u t ) = B(x t , u t )u t for any (x t , u t ) ∈ (X, U).
Proof See Appendix B.
The resulting lifted representation for continuous-time nonlinear systems in general form is: As a next step, ( 21) is expressed as an LPV Koopman model.Let z t = Φ(x t ) and introduce a scheduling map p t = µ(z t , u t ), such that B z • µ = B and B z belongs to a predefined function class, such as affine, polynomials, etc.In the LPV literature, due to computational simplicity, an affine representation is strongly preferred.The LPV Koopman representation of ( 14) is given by: with z 0 = Φ(x 0 ).

Control affine or linear input cases
In case ( 14) is in a control affine form: with g c : R nx → R nx×nu and u t ∈ U ⊆ R nu , Theorem 1 can be applied to obtain the lifted representation: where B(x t )u t = B(x t , u t ): Again, Eq. ( 24) can be expressed as an LPV Koopman model, but with only a state dependent scheduling variable, i.e. p t = µ(z t ).
As nonlinear systems with linear input are a particular case with g c (x t ) = b, where b ∈ R nx×nu is a constant matrix, the associated lifted form is also described by Eq. ( 24) and the Koopman model (22).Note that the input matrix B is still state dependent.
As discussed in [5], [6], if ∂Φ ∂x g ci ∈ span {Φ} with g ci being the i th column of g c , then there exists a matrix giving the lifted bilinear form: with u t,i being the i th component of u t .Equivalently, let z t = Φ(x t ), then a bilinear Koopman model is: where z 0 = Φ(x 0 ), z t,j represents the j th component of z t , and

Embedding of discrete-time systems
This section details the Koopman description of nonlinear autonomous discrete-time systems and presents the method we propose to analytically compute an associated Koopman form for systems with inputs.Additionally, we show how the lifted representations can be rewritten into LPV Koopman forms.

Koopman form of autonomous systems
Consider the discrete-time autonomous nonlinear system: with initial condition x 0 ∈ X ⊆ R nx , nonlinear state transition map f : R nx → R nx and k ∈ Z the discrete time.It is assumed that X is compact and forward invariant under f (•), i.e. f (X) ⊆ X, ∀k ∈ Z + .For discrete-time systems, as expressed in [16], the discrete-time Koopman operator is generally 'fixed' to the sampling interval, i.e.K t , for t = T s , to describe the evolution of the observables between each time step.We drop the exponent to ease readability.The Koopman operator K : F → F associated with the nonlinear map f is defined through the composition: where F is a Banach function space of observables φ : X → R. Given an arbitrary state x k , (30) is equivalent to the following relation: We assume there exists a finite dimensional Koopman invariant subspace As K is a linear operator [17], Kφ can be expressed as a linear combination of the elements of F n f .Let Φ = [φ 1 . . .φ n f ] be a basis of F n f .As detailed in [17], the effect of the Koopman operator on a component φ j is expressed as: where K is the matrix representation of the Koopman operator and the j th column of K contains the coordinates of Kφ j in the basis Φ.If we consider A = K , a finite dimensional representation of (29) in the lifted space is given as: Based on (29), we can substitute the LHS of (33) in terms of Φ(x k+1 ) = Φ(f (x k )) giving: Based on (34), we can formulate the existence condition for the choice of observables that span a Koopman invariant subspace: Similar to the continuous-time case, we can ensure the existence of an inverse transformation Φ † (Φ(x k )) = x k by ensuring that the identity function x = id(x) is also in the span of Φ, i.e., id ∈ span{Φ}, to obtain the original states.Given z k = Φ(x k ), the LTI Koopman model associated with (29) is:

Koopman form under inputs
The present section treats the derivation of the Koopman form for systems with input.Compared to the continuous-time case, the chain rule can no longer be applied to derive the lifted representation.Using the same sequential approach, we propose a method based on the FTC, to analytically derive the lifted form.

General nonlinear systems
Consider a discrete-time nonlinear system in the general form: given such that X is compact and forward invariant under f .Similar to the continuous-time case, we propose an approach that uses only state-dependent observables to analytically derive the Koopman form based on (37).Similar to the continuous-time case, we decompose the function f (x k , u k ) into the sum between autonomous and input driven dynamics: The first step is to lift the autonomous dynamics, by considering zero input, i.e., u k = 0: Applying the function Φ, the dynamics of the lifted system can be written as follows, assuming (35) is satisfied: Next, by considering the full dynamics of (37), we apply the lifting Φ: Compared to the continuous-time case, due the absence of a chain rule under the shift operator, we are no longer able to directly separate the autonomous and inputdriven contributions.To solve this problem, we employ the FTC to derive analytically an exact Koopman representation.
Theorem 2 Given a nonlinear system in terms of (37) and a lifting function Φ of class C 1 such that Φ(f (•, 0)) ∈ span {Φ} with Φ : X → R n f and X convex, then there exists an exact finite dimensional lifted form defined as: Proof Given that X is convex, for any two states p, q ∈ X ⊆ R nx the segment x(λ) = p + λ(q − p) is in X, for λ ∈ [0, 1].Next, as φ i is assumed to be continuously differentiable (φ i is the i th component of Φ, with i = 1, . . ., n f ), define the C 1 function h i : R → R as: Using the FTC (see Appendix A), we can write: where h i = ∂hi ∂λ .Next, substitute φ i in (45) and apply the chain rule to get: which in fact provides that: By choosing q k+1 = f (x k , 0) + g(x k , u k ) = x k+1 and p k+1 = f (x k , 0) we get: Substituting (48) into (47) at time moment k + 1 gives: Stacking all components of Φ and using (40), the exact lifted representation of (37) is given by: where ∂Φ ∂x represents the Jacobian of Φ.With a simplified notation, (50) can be written as (42) with the input matrix function given by (43).
In order to obtain the LPV Koopman form as in the continuous-time case, we need to factorize B in (42) for the lifted form: Provided that g(x k , 0) = 0, using Lemma 1 it follows that: Let z k = Φ(x k ).Similar to the continuous-time case, the lifted form (51) can be rewritten as the LPV Koopman model: where the scheduling map

Control affine or linear input case
For a control affine nonlinear system given by: Theorem 2 can be applied to obtain a lifted form: where B(x k , u k )u k = B(x k , u k ), given by the simplified form of (50): As can be seen, the input u k can easily be factored out in this special case.Furthermore, if z k = Φ(x k ), the LPV Koopman model is given by (53).
For nonlinear systems with linear input of the form: the application of Theorem 2 leads to: Then, the LPV Koopman form in terms of (53) follows.
It is important to note that, compared to the continuoustime case, for both the control affine and input linear systems, the input matrix function B also has a dependency on the input u k .Hence, the resulting Koopman form is complexity independent from the type of input dependency.

Approximation error of LTI Koopman forms
In this section we investigate how much approximation error is introduced if instead of the resulting LPV Koopman forms for nonlinear systems with input, one uses only strictly LTI approximations.Such LTI Koopman forms are of interest as they are widely assumed in practice [12], [15], [18], however, a clear characterization of the involved approximation error is lacking.Here, we focus only on discrete-time systems for brevity, but similar results can be obtained for the continuous-time case.

Notation
We introduce the following mathematical notation.ρ(A) = max r∈λ(A) |r| denotes the spectral radius of a matrix A ∈ R n×n with eigenvalues λ(A) and σ(P ) is the maximum singular value of P ∈ R m×n .v 2 is the Euclidean norm of a real vector v ∈ R n and P 2,2 represents the induced 2,2 matrix norm: For a discrete-time signal v : , where v k ∈ R n represents the value of v at time k and Z + stands for non-negative integers, and

Characterization of the approximation error
The approximate LTI Koopman model is given by: where ẑk is the associated state vector.The state matrix A satisfies the embedding condition (34), but B is obtained via either an approximation of B z or by a data-driven scheme like (extended) dynamic mode decomposition with control (EDMDc), see [12], [19].Let e k = z k − ẑk , where z k is the state of the exact Koopman form (53). Denote Given the initial conditions z 0 = ẑ0 such that e 0 = 0, the error dynamics between the true LPV Koopman form (53) and the LTI Koopman form (60) are: In order to characterize the expected size of e k as k evolves, we formulate the following theorem.Theorem 3 Consider the LPV Koopman embedding (53) of a general nonlinear system (37) and the approximative LTI Koopman form (60).Under any initial condition z 0 = Φ(x 0 ) = ẑ0 and input trajectory u : Z + → R nu with bounded u ∞ , the error e k of the state evolution between these representations given by (61) satisfies that: where Proof By iterative substitution, we obtain: Applying the 2-norm and using the triangle inequality: Due to the submultiplicative property of (59), (64) can further be expanded as: As u satisfies u ∞ = max l u l 2 , then: , then the inequality (66) becomes: Under the assumption that ρ(A) < 1, the following holds true: The limit (68) together with the inequality (67) show that the 2-norm of the approximation error is bounded, proving the first part of the theorem.
For the second part, let σ(A) < 1.Using A 2,2 = σ(A) and the closed-form of the resulting geometric series, the error can be explicitly bounded by: If β is large, which can be expected in case of significant input nonlinearities, the error (70) can be substantial.
Given the LPV form of the exact Koppman representation, the computation of β can be accomplished in a conservative manner based on a polytopic test or by gridding.Usually, B is computed via EDMDc which comes down to a least-squares approximation based on given trajectories of x and u.However, in terms of the LPV form (53), one can also synthesise B by minimizing the 2 -gain of (61) via finite gridding of X and U using convex optimization, or by taking the average using a leastsquares approach.

Examples
In this section, to demonstrate the applicability of the introduced results, we study and compare the simulation results of the Koopman models to the original system trajectories for both continuous and discrete-time examples.Furthermore, we compute an LTI Koopman approximation and verify the proposed error bound.

Continuous-time case
In this subsection, we drop the subscript t to simplify the notation.Consider the following nonlinear system: where x i and u i denote the i th components of the state x and input u, respectively.For simulations, the coefficient values µ = −0.05,λ = −1 are used.As the condition g c (x, 0) = 0 is not satisfied, we reformulate (70) as: The choice of observables generates a Koopman invariant subspace, such that the autonomous dynamics are represented through an exact finite dimensional lifting: Based on (72a)-(72c) and ( 17), a lifted representation of (71) is: Next, we apply the factorization method: Note that when elements of u become 0 at specific time instances, B(x, 0) is still well defined, as it is equal to the Jacobian ∂B ∂u | (x,0) .For example, in the instance that both u 1 = 0, u 2 = 0: The resulting lifted form associated with the nonlinear system (70) is: Given z = Φ(x), we can describe the LPV Koopman representation as: As B contains functions with only linear dependencies on the observables Φ(x), writing B z is trivial and is omitted here for brevity.To compare the responses of the original system and the Koopman form, the ODEs (70) and (77) are solved by Runge-Kutta 4 (RK4) with a sampling time T s = 10 −4 s.To asses the approximation quality of the model we use the • 2 and • ∞ norms of the difference between the i th component of the state evolution, i.e., i (t k ) = x i (t k ) − z i (t k ) (where t k represents the discrete time step of the numerical integration).We collect in i the differences for all times, i.e., i = [ i (t 0 ) . . .i (t N )], with i ∈ {1, 2}.In order to compare the responses of the original and the obtained Koopman model, their responses have been calculated for the initial condition x 0 = [1 1] which corresponds to z 0 = Φ(x 0 ) = [1 1 1] , and white input signals u i (t k ) ∼ N (0, 0.1).The same simulations have been repeated under multisine inputs (no phase difference) with a number of 6 excited frequencies equidistantly placed on the frequency range [0.1, 1] Hz for u 1 , and [1,10] Hz for u 2 , respectively.Fig. 1 shows the state trajectories for the two experiments, for a simulation time of 25 seconds.Visually, there is a perfect overlap between the state trajectories computed via the original system (70) and the lifted system (77).As detailed in Table (1), under both white noise and multisine excitation, the error measures i 2 are below 10 −10 and i ∞ are below 10 −12 , respectively, being close to numerical accuracy.This shows that the lifted model accurately represents the original system.It is likely that the observed error is induced by the numerical error of the RK4 based simulation.

Discrete-time case
In this subsection, the notation x k,i represents the value of the i th state at time k.We consider the following nonlinear system represented by the control affine statespace form: For simulation purposes, the used coefficient values are a 1 = a 2 = 0.7 and a 3 = 0.5.Using the same observable choice as for the continuous-time example Φ ( ] yields an exact finite dimensional lifting of the autonomous part, which has the following form: Using (56), the resulting input matrix is given by: Based on (80), the lifted form is:  Let z k = Φ(x k ) and notice that x 2 k,1 and x k,1 are part of the observables.Thus we can easily obtain B z • µ = B and write the LPV Koopman model of (78) as: with Fig. 2 shows the state trajectories computed via the nonlinear model ( 78) and the Koopman model (82), for white noise u k ∼ N (0, 0.5) and for multisine excitation as well.Similar to the continuous-time case, the multisine input is a sum of 6 sinusoids (no phase difference) with a constant increment between the excited frequencies.Also, in a similar manner to the previous example, we denote by i the vector containing the differences between the i th component of the state evolution, i.e., i = [ 0,i , . . ., N,i ] and k,i = x k,i − z k,i , with i ∈ {1, 2}.
As shown in Table 1, the first state is represented exactly and, for the second state, there are negligible deviations which are close to numerical precision.This shows that the LPV Koopman model accurately describes the dynamics of (78).

Approximation by an LTI Koopman form
While it has been shown that the proposed approach yields an exact finite dimensional Koopman form that accurately represents the dynamics of the original system, the input matrix is dependent on the state (and on the input, in the discrete-time case).One can wonder if such an LPV form really contributes to the system response and if one could get away with a fully LTI Koopman form as it is done in the works [12], [15], [18].As we show in this section, the accuracy of the resulting model can drastically decrease if only an LTI approximation is used.
Consider the discrete-time example (78).With a constant input matrix B, the assumed Koopman form of the system is: The original states, being part of the observables, are recovered through x k = [I 2 0 2×1 ]z k .One typical way to find B is to minimize the average 2-norm between B and B by the following approach.To get the most favor- able computation of B for comparison, we take the grid points in (X, U) corresponding to a simulation trajectory of (78) and collect them as: Z = Φ(x 0 ) . . .Φ(x N −1 ) , Z + = Φ(x 1 ) . . .Φ(x N ) and U = u 0 . . .u N −1 .
With A derived analytically in (79), the input matrix B is numerically computed as: where † denotes the pseudoinverse.This approach corresponds to the least-squares method used in EDMD [12], with the difference that we only need to compute the input matrix B. The simulations are repeated accordto Section 5.2.Fig. 3 shows large deviations between the second state trajectory, computed via the nonlinear dynamics (78) (black) and using the Koopman form (83) (red).The input term is nonlinear for the second state in (78), while the first state is affected linearly by u and its evolution is independent of x 2 .Hence, the overapproximation error is expected to be larger for the second state evolution, whereas the first state is only slightly affected.This behaviour is depicted in Table Note that these observations for the chosen observables that provide an exact lifting.Here, we compute in the favourable way this simulation using the EDMD method [12].However, it is not known if better performance can be obtained by increasing the lifting dimension or by using alternative choices of B. Fig. 4 shows that the evolution of the error e k 2 of the approximated LTI Koopman model (83) satisfies the error bound (69).

Conclusion
We have developed a systematic approach to analytically derive the Koopman model of both continuous and discrete-time general nonlinear systems.Furthermore, we showed that the resulting lifted forms can be interpreted as LPV Koopman models, allowing for powerful LPV tools to be used for analysis and control of nonlinear systems.As seen through the examples, this approach results in an exact representation of the original dynamics, in contrast to the usually assumed fully LTI Koopman model, that has a reduced approximation capability.We further introduced an error bound and showed that, while inaccurate compared to the exact LPV Koopman model, an approximated LTI Koopman representation satisfies the proposed bound, having a predictable behaviour.

A Fundamental Theorem of Calculus
The following theorem and its proof can be found in [22].We only reproduce the theorem here for completeness.where ζ i = ∂ζi ∂λ .Substituting, this is equivalent to: Next, the row elements can be vertically stacked giving: B(x, q) − B(x, p) =

Fig. 1 .
Fig. 1.Continuous-time example: state response of the original nonlinear system (70) given in black and its Koopman embedding (77) given in red under white noise (left panel) and multisine (right panel) excitation u.

Fig. 2 .
Fig. 2. Discrete-time example: state response of the original nonlinear system (78) given in black and its Koopman embedding (82) given in red under white noise (left panel) and multisine (right panel) excitation u.

Fig. 3 .
Fig. 3. Comparison to the approx.LTI form: state response of the nonlinear system (78) given in black and its approx.LTI Koopman embedding (83) given in red under white noise (left panel) and multisine (right panel) excitation u.

Fig. 4 .
Fig. 4. Evolution of e k 2 and the error bound (69) for the approximated LTI model under white noise (left) and multisine inputs (right).

Theorem 4 1 0
If a function f is continuous over an interval [a, b] and F is any antiderivative of f on [a, b], then: b a f (x) dx = F (b) − F (a). (A.1) B Proof of factorization lemma This section details the proof of Lemma 1. Proof Let λ ∈ R, p, q ∈ U ⊆ R nu and define an arbitrary input function u as the convex combination u(λ) = p + λ(q − p), with u ∈ [p, q] (element wise) and λ ∈ [0, 1].Define the function ζ i (λ) = B i (x, u(λ)), where B i denotes the i th row of B and i = 1, . . ., n f .By applying the FTC, the following statement holds true: ζ i (1) − ζ i (0) = ζ i (λ) dλ, (B.1)

Table 1
Characterization of the state-evolution error between the original nonlinear system and the Koopman forms in the considered simulation examples.