Learning Data-Driven PCHD Models for Control Engineering Applications

Page created by Annette Fuller
 
CONTINUE READING
Learning Data-Driven PCHD Models for Control Engineering Applications
Learning Data-Driven PCHD Models for
                                                                         Control Engineering Applications ?
                                                                          Annika Junker, Julia Timmermann, Ansgar Trächtler

                                                                       Heinz Nixdorf Institute, Paderborn University, Germany (e-mail:
                                                                      {annika.junker, julia.timmermann, ansgar.traechtler}@hni.upb.de)

                                                      Abstract: The design of control engineering applications usually requires a model that
                                                      accurately represents the dynamics of the real system. In addition to classical physical modeling,
                                                      powerful data-driven approaches are increasingly used. However, the resulting models are not
                                                      necessarily in a form that is advantageous for controller design. In the control engineering
                                                      domain, it is highly beneficial if the system dynamics is given in PCHD form (Port-Controlled
arXiv:2204.09436v2 [cs.SY] 21 Apr 2022

                                                      Hamiltonian Systems with Dissipation) because globally stable control laws can be easily realized
                                                      while physical interpretability is guaranteed. In this work, we exploit the advantages of both
                                                      strategies and present a new framework to obtain nonlinear high accurate system models in a
                                                      data-driven way that are directly in PCHD form. We demonstrate the success of our method
                                                      by model-based application on an academic example, as well as experimentally on a test bed.

                                                      Keywords: PCHD, passivity, hybrid modeling, system identification, nonlinear control

                                                             1. INTRODUCTION                                   to be stable (Mamakoukas et al. (2020)). Our approach
                                                                                                               to ensuring physically plausible models is based on the
                                         In the modeling of technical systems, data-driven methods             property of passivity.
                                         such as neural networks have been increasingly used in
                                                                                                               Passive systems, or specifically Port-Controlled Hamil-
                                         recent years. Compared to classical physically-based mod-
                                                                                                               tonian systems with Dissipation (PCHD) exhibit highly
                                         eling of technical systems, data-driven non-parametric ap-
                                                                                                               useful properties for the controller design (Byrnes et al.
                                         proaches enable the representation of generic correlations
                                                                                                               (1991)) since they are physically plausible and easy to
                                         without being constrained to a given parametric model. In
                                                                                                               interpret. Moreover, they can be used to straightforwardly
                                         most cases, data-driven model building results in a model
                                                                                                               obtain globally stable control laws, because a negative
                                         that accurately represents the system dynamics but is no
                                                                                                               feedback loop consisting of two passive systems is passive
                                         longer physically interpretable.
                                                                                                               (Sepulchre et al. (1997)) and there is a strong connection
                                         Several popular and powerful numerical methods for sys-               to Lyapunov stability (Khalil (2015)). However, a complete
                                         tem identification have been developed in recent years                nonlinear system model is required to analytically obtain
                                         within Koopman operator theory (Schmid (2010); Proctor                such a PCHD form. Therefore, we propose a new frame-
                                         et al. (2016); Brunton et al. (2016b); Korda and Mezić               work to directly learn such PCHD models in a data-driven
                                         (2018)). These methods extract a dynamic system from                  way. Inspired by the system identification methods of the
                                         the measured data of the underlying system by lifting                 Koopman operator, we follow the strategy of a hybrid
                                         the states into a generally higher-dimensional space and              approach, i. e., we use measurement data of the original
                                         approximating the dynamics as a linear system, which is               system combined with prior physical knowledge about the
                                         called Extended Dynamic Mode Decomposition (EDMD)                     energy stored in the system.
                                         (Williams et al. (2015)). The characteristics of a linear sys-
                                                                                                               The work is structured as follows: Section 2 reviews the ba-
                                         tem description open up new possibilities for applications,
                                                                                                               sics of passive systems, PCHD models, Extended Dynamic
                                         e. g., gaining deeper insight into the system by analyzing
                                                                                                               Mode Decomposition, and stable Koopman operators. In
                                         system-theoretic properties (Junker et al. (2022)). How-
                                                                                                               Section 3, we introduce the proposed algorithm for obtain-
                                         ever, it is not guaranteed that the linearly approximated
                                                                                                               ing a data-driven model in PCHD form. Section 4 demon-
                                         model correctly represents the system theoretic proper-
                                                                                                               strates the success of the framework with simulated and
                                         ties of the underlying nonlinear system. Currently, some
                                                                                                               experimental results. Section 5 summarizes the approach
                                         approaches impose stability properties on the data-driven
                                                                                                               and reveals possible future research.
                                         model by forcing the eigenvalues of the Koopman operator
                                         ? This work was developed in the junior research group DART           Notation: Assume A ∈ Rn×n . A> denotes the transpose
                                         (Datengetriebene Methoden in der Regelungstechnik), Paderborn         and A+ the Moore-Penrose inverse of A. A is said to be
                                         University, and funded by the Federal Ministry of Education and       positive-definite () if x> Ax > 0 for all x ∈ Rn \ 0
                                         Research of Germany (BMBF - Bundesministerium für Bildung und        and said to be positive semi-definite () if x> Ax ≥ 0
                                         Forschung) under the funding code 01IS20052. The responsibility for   for all x ∈ Rn . kAk denotes the spectral norm and
                                         the content of this publication lies with the authors.                kAkF the Frobenius norm of A. O(n) is the group of
                                         © 2022 the authors. This work has been accepted to IFAC for
                                                                                                               n × n orthogonal matrices. A real-valued, continuously
                                         publication under a Creative Commons Licence CC-BY-NC-ND.
differentiable function f is called positive-definite in a                                                  >
                                                                                                        ∂V
neighborhood D of the origin if f (0) = 0 and f (x) > 0                      ẋ = (J (x) − D(x))                  + B(x)u,    (5a)
                                                                                                        ∂x
for x 6= 0. In all cases, the index t denotes discrete-time                                
                                                                                           >
system descriptions.                                                                    ∂V
                                                                             y = B > (x)       ,                       (5b)
                                                                                        ∂x
                   2. BACKGROUND                                where x ∈ Rn contains the states by which the en-
                                                                ergy is defined and u, y ∈ Rp are the port power vari-
In the following, we introduce the notion of passivity (2.1)    ables. V : Rn → R is a positive-definite smooth function
and discuss PCHD systems (2.2) in more detail. Moreover,        representing the stored energy. J (x) ∈ Rn×n is a skew-
we review the numerical system identification method            symmetric matrix defining the energy flow inside the
Extended Dynamic Mode Decomposition for control (2.3)           system and D(x) ∈ Rn×n is a symmetric positive semi-
and raise the topic of stable Koopman operators (2.4).          definite matrix defining the energy dissipation effects.

2.1 Passive Systems                                             The time derivative of V yields
                                                                                                       >
                                                                                       ∂V           ∂V
The notion of passivity was motivated by energy dissipa-                V̇ (x) = u> y −    D(x)             ≤ u> y,            (6)
                                                                                        ∂x          ∂x
tion of a dynamical system and has been used to analyze
                                                                so that (5) meets the passivity criterion (3).
the stability of a general class of interconnected nonlinear
systems (Byrnes et al. (1991)). Hyperstability is closely       2.3 Extended Dynamic Mode Decomposition with Control
related to passivity and refers to linear systems that can be
described by a transfer function that is positive real (An-
                                                                With the linear but infinite-dimensional Koopman opera-
derson (1968); Popov (1963, 1973)). Byrnes et al. (1991)
                                                                tor (Koopman (1931)), the dynamics of nonlinear systems
established the concept of passivity for nonlinear systems.
                                                                can be described linearly by lifting the states into a higher-
Passive systems are always stable and the concept can be
                                                                dimensional space (Brunton et al. (2016a)). For practical
used to asymptotically stabilize nonlinear feedback sys-
                                                                applications, the Koopman operator is usually approxi-
tems, making such a system description highly desirable.
                                                                mated numerically as a finite-dimensional matrix, using
Consider continuous-time nonlinear state-space models           the well-known method Extended Dynamic Mode Decom-
                       ẋ = f (x, u),                (1a)       position with Control (EDMDc) (Proctor et al. (2016);
                                                                Williams et al. (2015)). Below is a brief description of the
                       y = g(x, u),                  (1b)
                                                                algorithm; a detailed utilization of the method illustrated
where the vector x ∈ Rn denotes the states of the system        with examples is given in Junker et al. (2022).
and ẋ ∈ Rn the time derivative of the states. u ∈ Rp
denotes the system inputs and y ∈ Rq the system outputs.        In the following, continuous-time control-affine systems
f is assumed to be locally Lipschitz, g to be continuous,                              ẋ = f (x) + Bu                   (7)
and f (0, 0) = g(0, 0) = 0 to be the fixed point.               with a constant input matrix B ∈ R      n×p
                                                                                                             are considered,
The system (1) with p = q is passive if there exists a          which is a justified restriction in many control engineering
continuously differentiable positive semi-definite storage      applications.
function V : Rn → R, such that                                  For the approximation of the Koopman operator, N ob-
                               Z t                                                                                          >
                                                                servable functions Ψ(x) = [ψ1 (x), ψ2 (x), · · · , ψN (x)] are
         V (x(t)) − V (x(0)) ≤     u> (τ )y(τ )dτ ,    (2)
                                  0
                                                                defined, which lift the states into the higher-dimensional
                                  ∂V                            space. The algorithm approximates the dynamics of the
                  ⇒ V̇ (x(t)) =      ẋ ≤ u> y         (3)      lifted states Ψ(x) as a discrete-time system
                                  ∂x                                                                                     
for all (x, u). Illustratively, it means                                                                           Ψ(xk )
                                                                  Ψ(xk+1 ) ≈ K t Ψ(xk ) + B t uk = [K t , B t ]             . (8)
                                                                                                                     uk
              stored energy ≤ supplied energy.         (4)
Moreover, special cases cover strictly passive or lossless      With measurement data
systems, where the inequality in (2)-(4) is replaced by <                   X = [x1 , x2 , · · · , xM −1 ] ∈ Rn×(M −1) ,     (9a)
or =, respectively.                                                          X 0 = [x2 , x3 , · · · , xM ] ∈ Rn×(M −1) ,      (9b)
If the system (1) is passive with a positive-definite storage                                                     p×(M −1)
                                                                              U = [u1 , u2 · · · , uM −1 ] ∈ R                (9c)
function V (x), then x = 0 is stable. Furthermore, if the       and
storage function is radially unbounded, the origin will be
globally asymptotically stable (Khalil (2015)).                    Ψ(X) = [Ψ(x1 ), · · · , Ψ(xM −1 )] ∈ RN ×(M −1) ,         (10a)
                                                                         0                                    N ×(M −1)
                                                                   Ψ(X ) = [Ψ(x2 ), · · · , Ψ(xM )] ∈ R                      (10b)
2.2 Port-Controlled Hamiltonian Systems with Dissipation        results                                        
                                                                         0                                 Ψ(X)
The dynamics of non-resistive physical systems can be             Ψ(X ) ≈ K t Ψ(X) + B t U = [K t , B t ]                     (11)
                                                                                                             U
given an intrinsic Hamiltonian formulation, leading to                                                +
Port-Controlled Hamiltonian (PCH) systems (Maschke                                                Ψ(X)
                                                                        ⇒ [K t , B t ] ≈ Ψ(X 0 )           ,                  (12)
and van der Schaft (1992)) and have been extended by dis-                                          U
sipation effects, leading to PCHD (Maschke et al. (2000))       where K t ∈ RN ×N is the approximated Koopman opera-
                                                                tor and B t ∈ RN ×p the lifted input matrix. The resulting
discrete-time system description for EDMDc prediction is            (1) The necessary condition dim u = dim y for the PCHD
given by                                                                form is met (see Sec. 2.2).
              Ψ̂(xk+1 ) = K t Ψ(xk ) + B t uk .      (13)           (2) Measured or simulated data of x and u is available
The hat on the symbols emphasizes that the quantities are               in a sufficiently large amount.
estimated, cf. (8).                                                 (3) Basic physical prior knowledge exists, i. e., the energy
                                                                        function of the system.
2.4 Stable Koopman Operators                                        Again, consider continuous-time control-affine systems (7).
                                                                    The aim is to obtain a data-driven passive continuous-time
Gillis et al. (2019) established an algorithm that computes         system, with the PCHD form (5) being the preferred choice
a nearby stable discrete-time system to an unstable one.            for this purpose, assuming the following constraints:
This approach has been applied to the Koopman operator
and has shown that the EDMD prediction error drastically            (1) The matrices J and D are constant. In general, these
reduces when using stable approximated Koopman opera-                   matrices may depend on x, so this constraint corre-
tors instead of unstable ones (Mamakoukas et al. (2020)).               sponds to an approximation, which we will analyze
                                                                        later in the application (see Sec. 4).
The main idea is based on a new characterization for                (2) During the learning process, J and D are combined to
the set of stable matrices: A matrix As ∈ Rn×n is stable                K = J −D. This assumption does not pose a problem
if there exist S, O, T ∈ Rn×n such that As = S −1 OT S                  because any matrix can be uniquely decomposed into
where S  0, O is orthogonal, T  0 and kT k ≤ 1. On                    a symmetric and a skew-symmetric matrix. Thus
this basis, the next stable matrix As to an unstable matrix             applies
A in terms of the Frobenius norm can then be defined as                                                         
follows, where the allowed search space is given by the set                 J = 21 K − K > , D = − 12 K + K > .         (18)
of stable matrices                                                  (3) B is a constant matrix.
    As =           arg inf       kA − S −1 OT Sk2F .   (14)
          S0,O∈O(n),T 0,kT k≤1                                    This results in the following system description
                                                                                                  >
An algorithmic solution for (14) can be found by a pro-                                         ∂V
jected gradient descent. More precisely, the matrices                                 ẋ = K           + Bu.                 (19)
                                                                                                ∂x
S, O, T are initialized in and projected onto the set of
feasible matrices in each descent step, where the objec-            The measurement data is stacked into
tive function scores the distance to the original unstable                     X = [x1 , x2 , · · · , xM ] ∈ Rn×M ,         (20a)
matrix. While projecting onto the set of feasible matrices,
the eigenvalues of the matrices are systematically shifted,                      Ẋ = [ẋ1 , ẋ2 , · · · , ẋM ] ∈ Rn×M , (20b)
                                                                                                                    p×M
which is explained in detail below.                                              U = [u1 , u2 , · · · , uM ] ∈ R        . (20c)
Real symmetric matrices A ∈ Rn×n with eigenval-                     Note that unlike EDMDc, see (9), here the time derivatives
ues λ1 , · · · , λn are diagonalizable by orthogonal matrices       of x are used.
V ∈ Rn×n yielding                                                   Prior physical knowledge about the total energy
               A = V diag(λ1 , · · · , λn )V > .            (15)                       V (x) = Ekin + Epot                   (21)
Due to this property, we set                                        inside the system is necessarily and used for
          f (A) = V (diag(f (λ1 ), · · · , f (λn ))) V > , (16)                                       >
                                                                                                   ∂V
where f is any complex-valued function defined on the                                    Ψ(x) =           ,                  (22)
                                                                                                   ∂x
spectrum of A. This allows to simply shift the eigenvalues
                                                                    yielding
of a real symmetric matrix with the following function
                                                                                       ẋ = KΨ(x) + Bu.                     (23)
                           a, λ < a                                The matrices K and B are approximated over the          data,
                 pa,b (λ) = λ, λ ∈ [a, b]                  (17)     resulting in
                                                                                                                
                             b, λ > b                                                                        Ψ(X)
                                                                             Ẋ ≈ KΨ(X) + BU = [K, B]               ,        (24)
into the interval [a, b] (Gillis et al. (2019)). We will use this                                               U
strategy in Sec. 3 to systematically modify the definiteness                                          +
                                                                                                 Ψ(X)
of a symmetric matrix to satisfy the PCHD conditions                             ⇒ [K, B] ≈ Ẋ            .                  (25)
                                                                                                   U
(Gillis and Sharma (2017)).
                                                                    Next, the matrix K is decomposed into J and D, cf. (18).
           3. DATA-DRIVEN PCHD MODELS                               To obtain a PCHD form as in (5), it is necessary to ensure
                                                                    that D is positive semi-definite. For symmetric matrices,
Inspired by the compelling potential of passivity proper-           the definiteness follows directly from the properties of the
ties and the EDMDc method with subsequently targeted                eigenvalues, i. e., a symmetric real-valued matrix is positive
shifting of eigenvalues, we establish a procedure for data-         semi-definite if all its eigenvalues are nonnegative.The
driven models in PCHD form. We do not seek to transform             eigenvalues of D can be set to non-negative using the
the states into a higher-dimensional space, but to obtain a         strategy from Sec. 2.4. According to (15)-(17), a positive
PCHD model by combining measurement data with prior                 semi-definite D is thus calculated as follows
physical knowledge. The following assumptions are made:                                     D  = p0,∞ (D)                   (26)
Table 1. Physical parameters of the pendulum.
              measurement data          total energy function
                                                                                 symbol     physical parameter            value
                                                   ⊤                             m        point mass of the pendulum    1 kg
                                               ∂V                                   l       length of the pendulum        0.5 m
         X, Ẋ, U                 Ψ(x) =
                                               ∂x                                  g        gravity constant              9.81 m/s2
                                                                                   d        damper constant               0.05 kgm2 /s
                                           +                  The total (potential and kinetic) energy is given by
                                     Ψ(X)
                            K, B = Ẋ                                       V (x) = 12 ml2 x22 + mgl(1 − cos(x1 )),           (30)
                                        U
                                                                yielding
                                                                                            >                   
                                                                                          ∂V         mgl sin(x1 )
                           1              1                                Ψ(x) =              =                   .        (31)
                      J=     K − K⊤ , D = − K + K⊤                                        ∂x             ml2 x2
                           2               2
                                                                The algorithm presented in Sec. 3 returns
                                                                                                               
                                                                                     0 4           0 0             0
  algorithm

                                                                            J=             ,D =            ,b =        ,      (32)
                                                                                    −4 0           0 0.8           4
                                    D⪰ = p0,∞ (D)
                                                                which corresponds to the analytical PCHD model derived
                                                                from the nonlinear physical model
                                                                                                                       
                  B        J                   D⪰                            0 ml1 2              0 0                    0
                                                                  J ph =                , D ph =             , bph = 1 . (33)
                                                                           − ml1 2 0              0 md2 l4              ml2

                        data-driven PCHD model                  D is already positive semi-definite and therefore does not
                                                                need to be modified, so it is D  = D.
                       ẋ = (J − D⪰ ) Ψ(x) + Bu.
                                                                Figure 2 shows simulation results of the autonomous
                                                                swinging pendulum, assuming incorrect (shifted) param-
Fig. 1. Schematic flow of the algorithm to obtain a data-
                                                                eters for the total energy function. A deviation of 10 %
     driven PCHD model.
                                                                from the original value does not pose a problem for the pa-
with                                                           rameters m and d, as it is corrected by the algorithm, but
                                0, λ < 0                        leads to poor results for g and l. This can be explained by
                   p0,∞ (λ) =            ,           (27)
                                λ, λ ≥ 0                        the latter two parameters having a major influence on the
so that this results in a PCHD system description that          oscillation dynamics, i. e., the eigenfrequency. Note here
meets all criteria and is passive                               that the chosen deviation is just for illustrative purposes; if
                                                                uncertainty about the system parameters exists, they may
                ẋ = (J − D  ) Ψ(x) + Bu.           (28)       generally be identified more accurately i. e., optimized for.
The overall procedure for obtaining a data-driven PCHD
model is summarized in Fig. 1.
                                                                                             original         shifted d     shifted m
                               4. RESULTS                                                    shifted g        shifted l

                                                                                    2
                                                                   x1 in rad

The algorithm is demonstrated on two different systems.
First, the pendulum is analyzed based on a model, and                               0
then we show experimental results on the golf robot.
                                                                                  −2
4.1 Pendulum                                                                            0       1         2         3        4           5

The proposed framework is simulatively validated using                            10
                                                                   x2 in rad/s

the nonlinear pendulum with damping as an introductory                             5
classical control engineering example. Assume the follow-                          0
ing differential equations
                                                                                  −5
             ẋ1 = x2 ,                             (29a)                        −10
            ẋ2 = − gl sin(x1 ) − mld 2 x2 + ml1 2 u, (29b)                             0       1        2        3          4           5
                                                                                                         time t in s
where x1 and x2 are the angle and angular velocity of the
pendulum, respectively, and the parameters are assumed
to be as shown in Table 1. The system input u is the            Fig. 2. Analysis of possible errors in prior knowledge: Iden-
torque on the pendulum.                                              tified data-driven PCHD models for the pendulum
                                                                     with different parameter shifts of the total energy
Ten simulated trajectories (numerical integration with               function.
RK4 solver) were used to generate the training data.
Each trajectory had a duration of 1 s, with a step size of      4.2 Golf Robot
∆t = 0.01 s and random initial conditions from the basin
                                                   >
of attraction of the stable equilibrium x∗ = [0, 0] with        The autonomously putting golf robot shown in Fig. 3
piecewise constant u ∈ [−1, 1].                                 serves as a demonstrator for data-driven methods in con-
The data-driven learning of a PCHD model by (25) yields
                                                                                                              
                                                                              0 6.18              0 −0.74          0
                                                                      J=                 ,D =               ,b =     , (38)
                                                                           −6.18 0             −0.74 6.44         23
                                                                     where D is not positive semi-definite with eigenvalues
                                                                     λ1 = −0.08, λ2 = 6.52. Thus, D is modified to be positive
                                                                     semi-definite by (26) such that
                                                                                                          
                                                                                                 0.08 −0.73
                                                                                        D =                             (39)
                                                                                                −0.73 6.44
                                                                     with eigenvalues λ1 = 0, λ2 = 6.52.
                                                                     To evaluate the model accuracy of the data-driven models,
                                                                     the simulation of a test measurement is compared to the
                                                                     physics-derived model. Figure 4 shows the prediction over
                                                                     time and the cumulative prediction error
Fig. 3. Golf robot as a demonstrator for data-driven                                   k
    methods in control engineering.                                                    X
                                                                              e(tk ) =    (x1,meas (tm ) − x1,pred (tm ))2 (40)
trol engineering. Two gear shafts connected with a toothed                            m=1
belt drive form the stroke mechanism, where the drive                of y = x1 . Both data-driven models provide higher predic-
is located on the lower gear shaft and the golf club is              tion accuracy with greatly reduced modeling effort than
mounted on the upper gear shaft.                                     the physics-derived nonlinear model (34). Shifting the
A simplified physically motivated nonlinear model com-               eigenvalues from D to D  provides a slightly lower predic-
bines the masses into a single rigid body with torque u as           tion accuracy, but exhibits the highly beneficial properties
a control input. The differential equations with parameters          of the PCHD form.
shown in Table 2 can be described by the following:                  For comparison, the analytically PCHD model derived
                ẋ1 = x2 ,                            (34a)          from the nonlinear physical model (34) is given by
                                                                                                      
               ẋ2 =   −mga sin(x1 )−Md (x)+4u
                                               ,             (34b)                 0 J1          0 6.92
                                  J                                      J ph =           ≈                ,            (41a)
                 T                                                                − J1 0      −6.92 0
where x = [ϕ, ϕ̇] contains the angle and angular velocity                                                      
of the golf club and the nonlinear dissipation torque                                 0    0             0       0
                                                                         D ph (x) =              , bph = 4 ≈            (41b)
                                                                                      0 dph (x)                27.68
     Md (x) = dx2 + rµsgnx2 |mx22 a + mg cos x1 |     (35)                                               J
                                                                     with
combines viscous and sliding friction.                                          
                                                                                  d
                                                                                 2,                               x2 = 0
The total energy function is given by                                 dph (x) =   J                                          . (42)
                                                                                  d rµ mx22 a + mg cos(x1 )
            V (x) = 12 Jx22 + mga(1 − cos(x1 )),         (36)                    2+ 2                       ,     x2 6= 0
                                                                                  J  J           x2
yielding
                           >                                     Note here that D ph (x) depends on x. Nevertheless, the
                        ∂V          mga sin(x1 )                     dominant nonlinearities of the golf robot are likely to be
            Ψ(x) =              =                 .      (37)
                         ∂x             Jx2                          represented by the energy function.
At this point, we emphasize that no knowledge of nonlinear
dissipation effects is required, neither about the nonlinear-                    5. CONCLUSION & OUTLOOK
ities nor about the related parameters.
                                                                     This work has established an algorithm to obtain a PCHD
The training data consists of several test bench measure-            model using measurement data and fundamental physical
ments with different excitations u of the system (chirp,             prior knowledge about the energy stored in the system.
sine, and step) and a 1 kHz sampling rate combined into              Current research is about designing stabilizing controllers
the matrices X and Ẋ. Because only the output variable              u = β(x) for the data-driven PCHD models by preserving
y = x1 = ϕ is measured directly, the data for x2 and                 the PCHD structure, so that the closed-loop dynamics is
ẋ2 are generated offline by smoothing spline interpolation          given by
followed by numerical differentiation.                                                                          >
                                                                                                             ∂Vd
                                                                                  ẋ = (J d (x) − D d (x))                  (43)
      Table 2. Physical parameters of the golf robot.                                                        ∂x
  symbol   physical parameter                      value
                                                                     ensuring stability and robustness features. The desired
    m      mass of the golf club                   0.5241 kg
                                                                     system behavior is determined by the new energy function
    J      inertia of the rotating mass            0.1445 kg/m2      Vd (x), which has a strict local equilibrium at the desired
    g      gravity constant                        9.81 m/s2         equilibrium x∗ , and the desired interconnection and damp-
    a      length from the axis of rotation to     0.4702 m          ing matrices J d (x) = −J >                   >
                                                                                                d (x), D d (x) = D d (x)  0, re-
           the center of mass of the golf club                       spectively (Ortega et al. (2002); Kotyczka and Lohmann
     d     damper constant                         0.0132 kgm2 /s    (2009)). In addition, future research might address how
     r     length from the axis of rotation to     0.0245 m          to further extend the algorithm to allow state-dependent
           the friction point
                                                                     matrices for J , D, and B.
     µ     coefficient of friction                 1.5136
measurement       data-driven model   data-driven PCHD model                                 physical NL model
                                                                                                                 25
    x1 in rad

                    1
                    0
                   −1                                                                                            20
                         0       2         4       6        8      10         12       14

                                                                                            cumulative error e
                    4
    x2 in rad/s

                                                                                                                 15
                    2
                    0
                   −2                                                                                            10
                         0       2         4       6        8      10         12       14

                   0.2                                                                                            5
    u in Nm

                     0
                  −0.2
                  −0.4                                                                                            0
                         0       2         4       6         8     10         12       14                             0         5        10
                                                   time t in s                                                                 time t in s

Fig. 4. Prediction accuracy based on a test measurement on the golf robot. The simulated data-driven models provide
     higher prediction accuracy than the simulated classically physics-derived nonlinear model (34) (in green) with
     greatly reduced modeling effort. The PCHD model with positive semi-definite D (39) (in blue) provides a slightly
     lower prediction accuracy than the purely data-driven model (38) (in red).

                                REFERENCES                              Kotyczka, P. and Lohmann, B. (2009). Parametrization
                                                                          of IDA-PBC by assignment of local linear dynamics. In
Anderson, B. (1968). A simplified viewpoint of hypersta-
                                                                          2009 European Control Conference, 4721–4726. IEEE.
  bility. IEEE Transactions on Automatic Control, 13(3),
                                                                        Mamakoukas, G., Abraham, I., and Murphey, T.D.
  292–294.
                                                                          (2020). Learning data-driven stable Koopman opera-
Brunton, S.L., Brunton, B.W., Proctor, J.L., and Kutz,
                                                                          tors. arXiv: 2005.04291.
  J.N. (2016a). Koopman invariant subspaces and finite
                                                                        Maschke, B.M., Ortega, R., and van der Schaft, A.J.
  linear representations of nonlinear dynamical systems
                                                                          (2000). Energy-based lyapunov functions for forced
  for control. PloS one, 11(2), e0150171.
                                                                          Hamiltonian systems with dissipation. IEEE Transac-
Brunton, S.L., Proctor, J.L., and Kutz, J.N. (2016b). Dis-
                                                                          tions on Automatic Control, 45(8), 1498–1502.
  covering governing equations from data by sparse identi-
                                                                        Maschke, B.M. and van der Schaft, A.J. (1992). Port-
  fication of nonlinear dynamical systems. Proceedings of
                                                                          controlled Hamiltonian systems: Modelling origins and
  the National Academy of Sciences of the United States
                                                                          systemtheoretic properties. IFAC Proceedings Volumes,
  of America, 113(15), 3932–3937.
                                                                          25(13), 359–365.
Byrnes, C.I., Isidori, A., and Willems, J.C. (1991). Passiv-
                                                                        Ortega, R., van der Schaft, A., Maschke, B., and Escobar,
  ity, feedback equivalence, and the global stabilization of
                                                                          G. (2002). Interconnection and damping assignment
  minimum phase nonlinear systems. IEEE Transactions
                                                                          passivity-based control of port-controlled Hamiltonian
  on Automatic Control, 36(11), 1228–1240.
                                                                          systems. Automatica, 38(4), 585–596.
Gillis, N., Karow, M., and Sharma, P. (2019). Approxi-
                                                                        Popov, V.M. (1963). The solution of a new stability
  mating the nearest stable discrete-time system. Linear
                                                                          problem for controlled systems. Avtomat. i Telemekh.,
  Algebra and its Applications, 573, 37–53.
                                                                          7–26.
Gillis, N. and Sharma, P. (2017). On computing the
                                                                        Popov, V.M. (1973). Hyperstability of control systems,
  distance to stability for matrices using linear dissipative
                                                                          volume 204 of Grundlehren der mathematischen Wis-
  Hamiltonian systems. Automatica, 85(2), 113–121.
                                                                          senschaften. Editura Academiei, Bucuresti.
Junker, A., Timmermann, J., and Trächtler, A. (2022).
                                                                        Proctor, J.L., Brunton, S.L., and Kutz, J.N. (2016). Dy-
  Data-driven models for control engineering applications
                                                                          namic mode decomposition with control. SIAM Journal
  using the Koopman operator (accepted). In AIRC’22:
                                                                          on Applied Dynamical Systems, 15(1), 142–161.
  2022 3rd International Conference 2022.
                                                                        Schmid, P.J. (2010). Dynamic mode decomposition of
Khalil, H.K. (2015). Nonlinear control. Pearson, Boston.
                                                                          numerical and experimental data. Journal of Fluid
Koopman, B.O. (1931). Hamiltonian systems and trans-
                                                                          Mechanics, 656, 5–28.
  formations in Hilbert space. Proceedings of the National
                                                                        Sepulchre, R., Janković, M., and Kokotović, P.V. (1997).
  Academy of Sciences of the United States of America,
                                                                          Constructive Nonlinear Control. Communications and
  (17), 315–318.
                                                                          Control Engineering. Springer London Limited, London.
Korda, M. and Mezić, I. (2018). Linear predictors for
                                                                        Williams, M.O., Kevrekidis, I.G., and Rowley, C.W.
  nonlinear dynamical systems: Koopman operator meets
                                                                          (2015). A data-driven approximation of the Koop-
  model predictive control. Automatica, 93, 149–160.
                                                                          man operator: Extending dynamic mode decomposition.
                                                                          Journal of Nonlinear Science, 25(6), 1307–1346.
You can also read