Introduction

Soft robots have been receiving significant attention over the years, and have grown into an important research topic. In contrast to their rigid counterparts, soft robots have bodies made out of intrinsically soft/or extensible materials, which exhibit unprecedented adaptation to complex environments and can absorb impact energy for safe interactions with the environment, other robots, and even humans [1]. Soft robots have been applied in all aspects of robotic research, including but not limited to assistive robotics [2,3,4], grasping [5, 6•, 7], ground mobility [8, 9], legged locomotion [10, 11], aerial robots [12] and underwater robots [13].

One of the prevailing challenges relates to their modeling and control [14]. To facilitate model-based control, researchers have proposed several quantitative modeling methods to parameterize soft robots (mostly continuum robots) using analytical models. For instance, piecewise constant curvature models [15, 16] with extensions to physical interactions [17, 18] have been successfully applied in modeling dynamic motion of soft robots. Further, numerical models have been utilized to discretize the geometry and achieve approximations. Cosserat rod theory [19,20,21,22] and its extension to multiple degrees [23], discrete Cosserat models [24, 25], polynomial curvature models [26, 27], and rigid body approximations [28, 29] have been proposed to model soft robots numerically. Finite element models have also been applied in modeling soft robots using industrial simulators [30], as well as reduced-order models [31,32,33]. However, the effectiveness of these methods relies on the accuracy of measurements of the actuator (e.g., length, strain, or curvature), if not relying on feedback [34]. Due to the infinite degrees of freedom of soft robots, accurate first principles-based models are hard to derive. Moreover, in most cases, system nonlinearities pose additional difficulties to controller design [4]. One way to resolve such constraints is by considering data-driven methods [35, 36].

Data-driven methods provide promising solutions to soft robot modeling, with the merits of alleviating requirements for sensory data while addressing sensor noise [34]. Data-driven modeling methods for soft robots are generally categorized in two ways: (1) iterative kinematic mappings and (2) learning methods. The former utilizes iterative optimization to refine the desired mapping relationships among actuation, configuration and task spaces, such as iterative Jacobian matrix estimation [37, 38] and adaptive Kalman filters [39,40,41,42]. Learning methods for soft robots modeling include Feed-forward Neural Networks (FNN) [43, 44], Locally Weighted Projection Regression (LWPR) [45, 46] and Gaussian Process Regression (GPR) [47]. Analytical models with learning-based extensions are also applied to improve the dynamic modeling of soft robots [48,49,50,51]. In recent years, Reinforcement Learning (RL) has also been studied to model soft robots, such as model-based methods [52,53,54] and their model-free counterparts [55,56,57,58].

Other than machine learning approaches, Koopman spectral theory [59,60,61] has emerged as a dominant perspective over the past decade, in which nonlinear dynamics are represented in terms of an infinite-dimensional linear operator acting on the space of all possible measurement functions of the system [62,63,64,65,66,67,68]. Recent research efforts have sought to use the Koopman operator in robotics. Examples include modeling and control of a tail-actuated robotic fish [69], trajectory control of micro-aerial vehicles [70], dynamics estimation for a spherical robot [71] as well as model extraction for a simulated lunar lander system [72].

Recent advances in data-driven estimation approaches of the Koopman operator enable embedding the Koopman operator theory to soft robotic systems. First, instead of linearization at a certain point (local linearization), the Koopman operator is able to evolve a nonlinear system with full fidelity throughout the state space (global linearization). This makes Koopman operators an attractive approach for obtaining linear representations of complex and/or nonlinear systems. By expressing a system’s dynamics as a linear model, the stability properties can be more readily analyzed [73], and various well-designed reliable controllers can be easily obtained [74]. Second, via mapping the original unknown system to the Koopman space and approximating the operator from measurements, the Koopman operator theory can be used as a data-driven model extraction method. Both of the two aforementioned properties make the Koopman operator well-suited for implementation in soft robotics whereby complexity in modeling as well as control and nonlinearities are key challenges.

The main goal of this review is to offer an overview of recent advances in implementing the Koopman operator in soft robotic systems. In the “Background” section, we introduce the theoretical foundations of the Koopman operator theory. In the “Model Identification with KoopmanOperator” section, we present the implementation details of using the Koopman operator to extract model descriptions of soft robots. In the “Controller Design” section, different types of Koopman-based control structures and examples are introduced. Finally, in the “Discussion and Conclusion” section, we propose several possible future directions and discuss the challenges that can be addressed when applying the Koopman operator in the modeling and control of soft robotic systems.

Background

Fig. 1
figure 1

Overview of the Koopman operator theory

In this section, we give an overview of key relevant results on the Koopman operator as shown in Fig. 1, the Koopman generator and related data-driven approximation approaches.

Koopman Operator

Consider a dynamical system with state vector \(q \in \mathbb {R}^{n_{q}}\),

$$\begin{aligned} q_{t+1} = f(q_{t}) ~\text {or}~ \frac{d}{dt} q = f(q), \end{aligned}$$
(1)

for the discrete-time and continuous-time settings, respectively. Define a set of observables \(\gamma \in \mathcal {F}\) to be the mapped or lifted states. The evolution of observables \(\gamma \) using the infinite-dimensional Koopman operator \(\mathcal {K}:\mathcal {F} \rightarrow \mathcal {F}\) can be written as

$$\begin{aligned} \mathcal {K} \gamma (q_{t})= \gamma (f(q_{t}))~ \text {or} ~ \frac{d}{dt} \gamma (q) = \mathcal {K}\gamma (q). \end{aligned}$$

If we further define the lifted states \(\gamma (q)\) as new states \(z = \gamma (q)\) in this linear Koopman space, the original nonlinear problem is transferred into a linear problem in this new space and various traditional linear controllers can be designed and implemented.

The Koopman operator can also be utilized to identify the dynamical system of the nonlinear form. Under the full-observability assumption that there exists one of the observables \(\gamma (q)=q\), N Koopman-based items including Koopman modes \(v_{n}\), eigenvalues \(\lambda _{n}\) and eigenfunctions \(\varphi _{n}\) can be obtained by decomposing the Koopman operator [75]. Finally, the unknown nonlinear operator f in (1) can be approximated as the combination of the Koopman-based items as

$$\begin{aligned} q_{t+1} \!=\! \gamma (f(q_{t}))\!=\! \mathcal {K} \gamma (q_{t}) \rightarrow q_{t+1} \!=\!{\sum }_{n=1}^{N} v_{n}\lambda _{n}\varphi _{n}(q_{t}). \end{aligned}$$
(2)

Extended Mode Decomposition (EDMD)

In practice, we typically have access to the discretely sampled measurement data of the system, which are used to obtain a finite-dimensional approximated matrix of the infinite-dimensional Koopman operator. Although approximating the Koopman operator induces errors in the system propagation, it has been shown that the linear model is able to evolve the original system with acceptable accuracy [76, 77].

Of all the approximation approaches, one of the most popular algorithms is the Extended Dynamic Mode Decomposition (EDMD) approach [75]. It describes how to learn those Koopman-based items in (2) from data. Given state history \(q = [q_{1},q_{2},\dots ,q_{M},q_{M+1}]\) (commonly referred to as “snapshots"), \(\mathcal {K}\) can be expressed as a finite-dimensional approximation \(K:\mathcal {F}_{N} \rightarrow \mathcal {F}_{N}\) of the Koopman operator \(\mathcal {K}:\mathcal {F} \rightarrow \mathcal {F}\) via EDMD. To do so, we need a dictionary of functions that lift state variables to the higher-dimensional space where observable dynamics is approximately linear. Define the dictionary \(\varvec{\Psi }(q_{m})=[\psi _{1}(q_{m}), \ldots , \psi _{N}(q_{m})]\), the Koopman operator can be approximated by minimizing the total residual between snapshots,

$$\begin{aligned} J =\frac{1}{2} \sum \limits _{m=1}^{M}\left( \varvec{\Psi }\left( q_{m+1}\right) -\varvec{\Psi }\left( q_{m}\right) K\right) ^{2}. \end{aligned}$$

This can be solved by truncated singular value decomposition, yielding

$$\begin{aligned} K \triangleq \varvec{G}^{\dagger } \varvec{A}, \text {where } \left\{ \begin{array}{ll} \varvec{G}=\frac{1}{M} {\sum }_{m=1}^{M} \varvec{\Psi }_{m}^{*} \varvec{\Psi }_{m},\\ \varvec{A}=\frac{1}{M} {\sum }_{m=1}^{M} \varvec{\Psi }_{m}^{*} \varvec{\Psi }_{m+1}, \end{array}\right. \end{aligned}$$
(3)

with \(^{\dagger }\), T and \(^{*}\) denoting pseudoinverse, transpose and conjugate transpose, respectively. Obtained K via (3), we get

$$\begin{aligned} \left\{ \begin{array}{ll} v_{n} = (w_{n}^{*}B)^{T},\\ \lambda _{n} \eta _{n} = K\eta _{n},\\ \varphi _{n} = \varvec{\Psi }_{t}\eta _{n}, \end{array}\right. \end{aligned}$$
(4)

where \(\eta _{n}\) is the n-th eigenvector, \(w_{n}\) is the n-th left eigenvector of K scaled so \({w_{n}^{T}}\eta _{n} = 1\), and B is a weight matrix such that \(q=(\varvec{\Psi } B)^{T}\) [75].

The evolution of the original nonlinear system using the estimated Koopman operator is described by replacing expressions (4) into (2). Control inputs can be readily incorporated into the definition of \(\mathbf {\Psi }\) as an augmented state [78].

If the lifting dictionary is chosen as

$$\begin{aligned} \varvec{\Psi }(q_{m})=[{e_{1}^{T}}q, \ldots , e_{n_{q}}^{T}q_{m},] \end{aligned}$$

where \(e_{i}\) is the \(i-th\) unit vector in \(\mathbb {R}^{n_{q}}\), the estimated Koopman operator generated by the previous procedure is same as that obtained by Dynamic Mode Decomposition (DMD) [75]. Theoretically, DMD tries to get a linear approximation of the original system, i.e., \(q_{t+1} = Kq_{t}\). The estimate operator K is selected as the best-fit solution for all available data. Similarly, the DMD-based method can be extended for inputs [79].

Table 1 Summary of recent advances in Koopman operators in soft robotics

Koopman Generator

To better understand the beauty of the theory, we will give a short introduction to its associated infinitesimal generator — the Koopman generator, which is more close to the idea when the Koopman operator was first proposed in fluid dynamics theory [59].

Consider the system defined in (1), if the initial condition is defined as \(q_{0}\), the solution to the ordinary differential equation at time t can be denoted as \(\phi ^{t}(q_{0})\). It is also referred to as the flow map of the system. Define the Koopman semigroup of operators \(\{\mathcal {K}^{t}\}\) as \((\mathcal {K}^{t}g)(q) = g(\phi ^{t}(q))\), the infinitesimal generator \(\mathcal {L} \in \mathcal {F}\) of the semigroup is given by

$$\begin{aligned} \mathcal {L}g = \underset{t\rightarrow 0}{\lim }\frac{1}{t}(\mathcal {K}^{t}g-g) = \frac{d}{dt}g = \sum \limits _{i=1}^{N_{q}}\gamma _{i}\frac{\partial g}{\partial q_{i}}, \end{aligned}$$
(5)

it can be lifted to an infinite-dimensional function space \(\mathcal {F}\), which is thus also the space of observables.

The Koopman generator can be obtained by the reformulated EDMD — gEDMD [80]. Similarly, a dictionary of lifting functions is defined as \(\varvec{\Psi }(q)\) while we define additionally according to (5) that:

$$\begin{aligned} \dot{\varvec{\Psi }}(q) = (\mathcal {L}\varvec{\Psi })(q) = \sum \limits _{i=1}^{N_{q}}\gamma _{i}(q)\frac{\partial \varvec{\Psi }(q)}{\partial q_{i}}. \end{aligned}$$

Collecting the matrices of \(\varvec{\Psi }(q)\) and its derivatives \(\dot{\varvec{\Psi }}(q)\) of all the measurements, the generator is estimated by solving a similar least-square problem as what we do when calculating the Koopman operator.

Comparison of the Koopman operator and its generator: The data-driven extraction approach of the Koopman operator (EDMD) is originally proposed and propagated for the discrete-time system. It can be extended to the continuous-time operator via \(\mathcal {K}_{c} = \log (\mathcal {K})/\Delta t\), where \(\Delta t\) is the sampling time of the measurements. On the other hand, the Koopman generator is analyzed in a continuous manner. The benefit of using it is that the Koopman generator might be sparse even when the operator is not. However, the data-driven approximation of the Koopman generator requires analytical precomputation of the partial derivatives, which might introduce more prediction errors. The trade-off needs to be considered when selecting between the two versions of the Koopman theory.

Model Identification with Koopman Operator

Soft robots are composed of compliant materials, instead of rigid links and joints. The compliance provides soft robots flexibility, softness as well as safety when working in close contact with environments and humans. But these properties also make it hard to obtain model representations for analysis and control. Approaches to obtain models of robots can be separated into two categories: physics-based methods (i.e., derived from first principles) and data-driven methods. The model construction from physics-based approaches can be complicated for soft robots given their infinite degrees of freedom and nonlinear behaviors. One way to solve the problem is to embed the Koopman operator theory into model extraction. A primary benefit of the Koopman-based techniques is that a description of an input–output relationship can be obtained from data without explicitly defining a system state. This is especially useful for obtaining reduced-order models of soft robots that have essentially infinite-dimensional kinematics. Various works have been implemented in this area including the modeling and control of soft grippers, soft arms, soft legs, soft swimmers, etc. A detailed description is listed in Table 1. In this section, we emphasize the essential parts that need to be considered for explicit implementation and safety considerations in the practical examples.

Design of Lifting Functions

A critical challenge inherent to all methods employing Koopman operator theory is the choice of a proper set of lifting functions (typically called the dictionary). The lifting functions are crucial because they serve as the basis to construct an infinite-dimensional linear approximation of the original (often nonlinear) system’s state evolution. Poor choice of the lifting functions can significantly impact the estimation of the Koopman operator and hence the accuracy of higher-dimensional linearized dynamics.

Various distinctive approaches have been tested and implemented in different soft robotic systems to identify their dynamics with Koopman-based methods. Existing works regarding the construction of dictionaries fall under the following main directions.

  1. 1.

    Empirical Selection: The most frequently used lifting functions in Koopman-based soft robot modeling applications are the monomials [83, 85, 88, 89, 91] and polynomials [87•]. The maximum degree and dimensions are selected manually based on the properties of the underlying system. Fewer degrees might lead to insufficient and inaccurate estimation while more degrees can cause higher computation complexity and more possibility of overfitting. Thus, the dimension needs to be determined empirically or by comparing multiple candidates [91].

  2. 2.

    Mechanics-inspired Selection: Inspired by various physics-based approaches, it is plausible to consider that soft robot dynamics structure may match an approximate averaged dynamical model of a similar rigid robot. For example, it has been shown possible that a soft swimmer has a similar model to a rigid robotic fish [82•]. Although it is known that the dynamics differ between the soft and the rigid systems, the overall model structure is sufficient enough to design the basis functions used to estimate the observables. However, a similar rigid robot may not always be accessible. Nonetheless, recall that robotic systems have certain characteristic properties, e.g., degrees of freedom, configuration spaces, and workspaces, that can be acquired without knowledge of their exact dynamical models. These properties reveal fundamental information about system states and dynamics and can provide intuition on how to select lifting functions required for Koopman operator approximation. In [90], the authors have shown how fundamental topological spaces and Cartesian products thereof can be mapped to a basis of Hermite polynomials and Kronecker products thereof which serve as the dictionary of lifting functions.

  3. 3.

    Machine Learning Approaches: Another direction is to rely on machine learning methods to derive the dictionary [86] or the eigenfunctions directly [81]. The vector \(\varvec{\Psi }\) in the “Background” section is defined as a neural network, and parameters are tuned with offline training data to achieve high prediction accuracy. While such methods can have a stronger generalization capacity, they require significant tuning (e.g., in the case of neural networks the number of layers, number of units per layer, etc.), and large amounts of training data. The latter might in practice pose a challenge in robotics applications where data are in principle small.

Summary: Multiple algorithms are proposed to find the dictionary of lifting functions. Each of them has its own benefits and disadvantages to be utilized and the selection should be determined based on the system and measurements. If the offline dataset is large as well as diverse enough, in other words, the offline training data cover as various cases as possible, the machine learning-based dictionary could achieve high accuracy with sufficient time. If a similar rigid robot is available or the workspace of the system is known, the Mechanics-inspired approaches should be the best choice. Otherwise, the lifting functions can be designed based on experience or selected from multiple candidate dictionaries.

Robustness Considerations

Deriving guarantees and robustness for methods that rely on extracting dynamics from data are important as the efficiency and quality of measurements will have a significant impact on the performance of the estimated model and hence the controller design.

Different considerations are proposed to emphasize the robustness when utilizing Koopman-based approaches for model extractions. In [86], a deep stochastic Koopman operator is introduced to guarantee the stability of nonlinear stochastic systems. A probabilistic neural network is designed to estimate the distribution of the observables and the distribution is propagated by the Koopman matrices. The parameters of the probabilistic neural network as well as the Koopman operator are optimized during the training process.

Another design [88] to minimize the effect of modeling uncertainties and external disturbance is to include the usage of the Kalman filter. First, an augmented model is derived to include the disturbance model in the ordinary Koopman structure, and then a Kalman filter is adapted to estimate the observables and disturbances simultaneously.

Sparse models can be acquired from data-driven model extraction approaches for soft robots. Sparsity is desirable in terms of space complexity, which can enable the usage of a higher-dimensional dictionary. However, it can lead to an ill-conditioned matrix and even singularities. An ill-conditioned operator is sensitive to every measurement, which can carry a cost in prediction accuracy especially when the measurements are noisy. One way to deal with this problem is to add an optional projection after each approximation step to make sure the models learned are close to the lifted space [83].

There also exist some works to derive guarantees for methods employing the Koopman operator, including investigation of convergence of estimation [77, 92, 93] and global error bounds for the operator [69, 94]. Another direction is investigating the prediction error of, or providing robustness guarantees for, the perturbed systems’ performance when the data used for modeling are noisy [95]. However, such aforementioned investigations remain to be implemented and tested in soft robotic systems.

Controller Design

Soft robots differ from rigid-bodies in several ways that make them uniquely difficult to control. Soft robots exhibit nonlinear characteristics that are negligible in rigid materials, and they span such a wide range of designs which poses great challenges to the generalization ability of the designed controller. These differences render many of the standard approaches used to control rigid-bodied robots insufficient for soft robots.

A system model enables the design of model-based controllers that leverage model predictions to choose suitable control inputs for a given task. As introduced in “ModelIdentification with Koopman Operator” the Koopman operator can obtain either a linear model or a nonlinear model from data, which can be easily embedded into the design of corresponding control structures (Fig. 2). The Koopman operator is naturally formed for unforced systems. To extend it to forced cases for soft robots, the inputs can be either augmented to state and be lifted alongside the state [81, 86, 90, 6•] or be appended but not lifted to ensure that they appear linearly in the resulting model [83,84,85, 88, 89]. In this section, we give an overview of notable options for control-oriented frameworks based on the Koopman operator theory.

MPC

In particular, model-based controllers can anticipate future events, allowing them to optimally choose control inputs over a finite time horizon. A popular model-based control design technique that illustrates the beauty of prediction is model predictive control (MPC), wherein one optimizes the control input over a finite time horizon, applies that input for a single timestep and repeats the optimization process. The key component of, and the main item that affects the performance of, MPC is the “model." The Koopman operator, which takes into account new measurements and/or offline measurements, can serve as the model constraints in the MPC structure formulation.

Incorporating Koopman-based models into MPC design has been first introduced in [92]. The Koopman-based MPC is widely used in soft platforms for either linear MPC [83, 82•, 88, 84] or nonlinear MPC [83, 6•]. In [81], a soft inverted pendulum is controlled to be suspended stably in the inverted position. The Koopman-based MPC is also implemented in the soft continuum robots, the soft gripper to track desired trajectories [86, 84, 85, 88, 6•]. In these cases, the cost functions are always defined to minimize the difference between the predicted states obtained using the Koopman operator and desired trajectories or a target position.

Fig. 2
figure 2

Overall procedure of modeling and control of soft robotic systems with the Koopman operator theory. The dashed lines indicate that the training data could be acquired either online or offline. Also, note that the model learned by the Koopman operator can be either linear or nonlinear determined by the control objective

LQR

The linear model learned from data is appropriate to be implemented in optimal control methods like the Linear Quadratic Regulator (LQR) [96]. The LQR algorithm is essentially an automated way of finding an appropriate state-feedback controller, which reduces the amount of work done by the control systems engineer to optimize the controller. In [89], a reduced-order linear model of a helically actuated, inertial soft arm is obtained by the Koopman operator and serves as the model constraints to solve the discrete-time algebraic Riccati equation. The resulting control signal drives the soft arm to achieve two desired states. However, the scenario is limited to offline training and open-loop control where the input sequences are determined in simulation and deployed to the robot. An online-updated design for the soft robot and closed-loop optimal control theory with the Koopman operator remains an open direction.

Summary: The Koopman operator has been used for model-based control of dynamical systems, including feedback stabilization [97], optimal control [71, 98], model predictive control [92, 99] and hierarchical adaptive control [70]. These works illustrate the benefits of model-based control with the Koopman operator theory while, unfortunately, those control algorithms are not fully tested in soft platforms, which indicates directions of future work in this area.

Discussion and Conclusion

The Koopman operator theory has advanced considerably in recent years. In this review, we have explored its usage to represent nonlinear dynamical systems in a linear framework. Several data-driven approaches to estimate the Koopman operator are introduced. We have also summarized the detailed implementation process of the Koopman framework in soft robots and practical considerations. Finally, various control architectures that deploy the soft robotic systems to achieve different control objectives with the Koopman operator theory are illustrated with specific examples.

Despite the incredible promise of the Koopman operator, its application in soft robotic systems is still a very open field under active exploration. As concluded in Table 1, current applications are limited to soft robots with relatively simple structures. Investigations of and implementation on more complicated systems are promising directions to be investigated in the future. The extended platform can include rigid robots with soft parts and even complete elaborate compliant robots. On the other hand, the design of the Koopman-based controllers can be extended to more than MPC and optimal control. Various linear or nonlinear control architectures have the potential to be embedded into the soft robots with the Koopman operator theory.

Along with those more general open questions, there are several problems in terms of detailed implementation in the soft platforms that can be emphasized. First, the compliance of the material makes soft robots usually react slower than the rigid body, which poses a challenge to the time efficiency of the learned model and controller. In other words, if the sampling frequency is too large, it would be hard for the learned model to capture the actual relation between inputs and states as the states will be collected before the effect of inputs reflects in the output states. If the sampling rate is too small, the controller performance will be weakened. A proper and general way to find the optimal sampling rate is required and worth to be investigated. In addition, the accuracy of measurements is significant for all the data-driven approaches. However, the sensors and observers for soft robots are limited. Other than different types of pressure sensors, researchers tend to use motion capture systems or cameras to obtain position (and orientation) information of tips or selected points of the soft robot. But the velocity and/or higher-order derivatives are hard to be obtained accurately and directly from sensors, which currently makes it difficult to achieve aggressive control objectives for soft robots with the data-driven Koopman operator methods.

The applications of the Koopman operator theory in the modeling and control of soft robots are still an open and active research direction. More works and investigations are expected in the future. We hope that this review paper can serve as a stepping stone to inspire more works in the area.