Koopman operator based model predictive control for trajectory tracking of an omnidirectional mobile manipulator

Omnidirectional mobile manipulators (OMMs) have been widely used due to their high mobility and operating flexibility. However, since OMMs are complex nonlinear systems with uncertainties, the dynamic modeling and control are always challenging problems. Koopman operator theory provides a data-driven modeling method to construct explicit linear dynamic models for the original nonlinear systems, using only input-output data. It then allows to design control system based on well-established model-based linear control methods. This paper designs a Koopman operator based model predictive control (MPC) scheme for trajectory tracking control of an OMM. Firstly, using Koopman operator and extended dynamic mode decomposition method, an approximate high-dimensional linear dynamic explicit expression for the OMM system is obtained. Then MPC is employed to achieve tracking control based on the derived linear Koopman model. Finally, to show modeling accuracy for the OMM, the Koopman model is evaluated via both simulation and experimental tests. The control performances of the Koopman operator based MPC design are also verified in the simulation and experimental results.


Introduction
Omnidirectional mobile manipulators (OMMs) consist of an omnidirectional mobile platform and at least one manipulator fixed on the platform. The omnidirectional mobile platform can simultaneously and independently carry out translational and rotational motion. Therefore, OMMs have broad application prospects in many fields.
In the literature, many control approaches have been designed for the trajectory tracking control of OMMs. A decentralized trajectory tracking control method was proposed by Viet et al. 1 for an OMM considering disturbances and friction. Two controllers were respectively designed to control the mobile platform and manipulator. Fareh et al. 2 rearranged the dynamic model to take the form of two interconnected subsystems, and the trajectory tracking control law was designed for the two subsystems, respectively. Watanabe et al. 3 derived a kinematic and dynamical model for a mobile manipulator using the Newton-Euler method. The controller was designed based on computed torque control and resolved acceleration control. A reactive architecture and impedance control was proposed for an OMM by Djebrani et al. 4 to ensure reliable task execution. Zhang et al. 5 presented a feedback control scheme based on repetitive motion planning. An experimental mobile manipulator assembled on an omnidirectional platform by a dual-arm torso with a human-like structure was presented by Sua´rez et al. 6 Guo et al. 7 analyzed the kinematic equation parameters that affects the motion accuracy of the omnidirectional system. For teleoperation of a dual-arm omnidirectional mobile robot, Song et al. 8 presented a shared-control-based design which can perform usercommanded tasks or autonomous operations. Avanzini 9 developed a constrained model predictive control for mobile robotic manipulators, which it is assumed that the robot is velocity controlled. However, for control designs mentioned above, the control performances depend on the nonlinear dynamic models, and most control methods cannot deal with constraint problems. The dynamic modeling for OMMs is complicated and time-consuming since OMMs are multi-input and multi-output systems with high nonlinearity, strong coupling and complex uncertainty. The controller design based on complex nonlinear models may lead to poor performances, if the model accuracy cannot be guaranteed.
For complex nonlinear systems, linearization is often considered for the convenience of system analysis. Typical linearization methods include feedback linearization, 10 Taylor linearization, 11 piecewise linearization, 12 and orthogonal function approximation linearization, 13 etc. However, the limitations of these methods are obvious. Feedback linearization requires the precise mathematical model of the control system. Taylor linearization is only carried out near the working point, and just obtains the approximate expression of the original system. Piecewise linearization requires more information about nonlinear control system model. The orthogonal function approximation linearization method has a large computational burden and the controller design is complex. Koopman operator proposed by B. O. Koopman in 1931 provides a powerful tool for the study of nonlinear systems. 14 The basic idea is to re-express the state evolution process of the original nonlinear system as a linear process by elevating the state of the system to an infinite dimensional space. In other words, via Koopman operator, the infinite-dimensional linear representation of the original nonlinear system is obtained. Koopman operator theory can be used for global linearization of nonlinear dynamical systems. This data-driven modeling process only requires experimental or simulation data, which is completely different from traditional modeling methods.
However, although the nonlinear systems can be converted into infinite dimensional linear systems, Koopman operator is difficult to be applied in practice due to the complexity of its infinite dimension. Dynamic mode decomposition (DMD) method 15 and extended dynamic mode decomposition (EDMD) method 16 analyze the spectrum characteristics of the Koopman operator, to achieve the finite dimensional approximation of the infinite dimensional Koopman operator and get the dominant linear expression of the system model. The finite dimensional linear model of the original system is applicative to the model-based linear controller design approaches. Moreover, the DMD and EDMD are mainly based on least-squares regression algorithm, which are computationally flexible and easy to implement. The emergence and development of these data-driven methods make it possible for the Koopman operator method to be applied to many practical problems, and it also provides a new development direction for the control scheme in the era of big data.
In the literature, the EDMD-based Koopman operator approximation methods have been applied to dynamic control systems. Ian et al. 17 applied Koopman operator theory to the robot control system. A fully data-driven model was obtained using Koopman operator, and then the optimal control was designed based on this model. Simulation and experimental validations were carried out on the Sphero SPRK robot and an inverted pendulum system. Based on the Koopman dynamics model, a linear quadratic regulator (LQR) feedback control scheme was designed by Mamakoukas et al. 18 Simulations and experiments verified the effectiveness of the modeling and control of the tail-actuated robotic fish, and the Koopman-based LQR control was experimentally verified for the first time. Bruder et al. 19 obtained the Koopman high-dimensional linear model of a soft robot firstly based on EDMD method. Then the model was identified using a nonlinear autoregressive model with external input and a feed-forward neural network, which was compared with the Koopman high-dimensional linear model to verify the advantage of Koopman operator in the approximation accuracy of the real model. Model predictive control (MPC) scheme was designed and the trajectory tracking control performances were evaluated in the experiments. The active learning algorithm was introduced into the selection of the Koopman operator data sets by Ian. 20 By designing an active learning controller, the information carrying rate of Koopman operator was improved. Then a LQR control scheme was designed for a Van der Pol oscillator to verify the control performance of the model. In addition, experiments on a freefalling quadrotor have verified the ability of combining active learning active learning with the Koopman operator to perform a single execution model learning.
In this paper, a Koopman operator based MPC scheme is designed for trajectory tracking control of an OMM. The proposed control method is data-driven and does not need any prior knowledge. And Koopman operator can transform nonlinear MPC into linear MPC, thus non-convex optimization is avoided, which can meet the real-time requirements. Moreover, extensive experiments are carried out to verify the effectiveness of the MPC based on Koopman operator for rigid mobile manipulators. The OMM is composed of a mobile platform with three omnidirectional wheels and a parallelogram manipulator. Firstly, the Koopman operator for dynamics systems is briefly introduced. Then a high-dimensional linear model of the OMM, known as the Koopman model, is obtained using EDMD-based Koopman operator approximation method. This process is purely input-output datadriven and does not require any prior knowledge or dynamic model information of the OMM system. Linear MPC scheme is selected to design a trajectory tracking controllers for the robot, based on the

Koopman operator for dynamics systems
The Koopman operator is a powerful tool to simplify the analysis of nonlinear dynamic systems, which can transform a finite-dimensional nonlinear dynamic system into an infinite-dimensional linear system. Consider the following discrete-time nonlinear dynamics system: where j(k) 2 S is the n-dimensional system state on a smooth manifold S, and S R n is the state space. The parameter k is the discrete time step, and j(k) represents the state of the system at the time step k. f is the function which maps the state j(k) forward time step k into the future to j(k + 1), that is, the evolution of system states. Define a real-valued observable function on the state space g : S ! R, which is an element of an infinitedimensional Hilbert space. The Koopman operator acts on the real-valued observation function g, which is an infinite-dimensional linear operator: where 8 indicates function composition. In addition, the Koopman operator K acts on the function g of the state space, not on the state j(k), thus even though the state of the original nonlinear system is finite-dimensional, K retains the property of infinite dimensions. It can be obtained that: In other words, using the Koopman operator K, an infinite-dimensional linear dynamic system is defined, which represents the evolution of the state observation g(j(k)) to the next time step.
For more detailed information about Koopman operator theory, the reader may refer to the work by Proctor. 21 Finite-dimensional approximation of the data-driven Koopman operator In this subsection, the EDMD method is introduced, which approximates the Koopman operator and the Koopman eigenvalue, eigenfunction, and mode tuples. 16 The eigendecomposition of the linear Koopman operator K is as follows: where c j (j(k)) represents the eigenfunctions of the Koopman operator, and l j represents the corresponding eigenvalues.
Then the observation function g can be rewritten as: where the vector coefficients y j are called Koopman modes. The Koopman eigenvalues, eigenfunctions and modes triplet are the Koopman tuple. Also, the Koopman eigenfunctions c j (j(k)) are considered as basis observable functions. Due to the infinite dimension of the Koopman operator, it is challenging to calculate and difficult to implement in practical applications. Therefore, the finitedimension approximation to the Koopman operator is very necessary. Then a finite subspace approximation to the operator is defined, the span of which is the finite subspace denoted as F D . Then the operator K acting on c(j) is then represented in discrete time as: where y represents the weight coefficient and r(j(k)) is the residual term. Provide a dataset D = j(k) f g P k = 1 . The approximate Koopman operator K can be obtained using leastsquares minimization over the parameters of K: where P is the number of the collected data.
The solution is given by where y denotes the Moore-Penrose pseudoinverse and Convergence of EDMD to the Koopman operator has been analyzed. 22 In addition, the Koopman operator theory is also applicable to dynamic systems with control. According to the method by Korda and Mezic´, 23 consider the following nonlinear dynamic system with control: where j(k) 2 R n is the state of the system, and u(k) 2 R m is the control input.
The system state j(k) and the control input u(k) are merged into an augmented state: x = ½j T , u s T T , u s denotes the all control sequences, that is (u i ) ' i = 0 . Then the augmented system can be written as: where, u s (k) denotes the k th element of the sequence u s . For system (11), Koopman operator is defined as follows: For the sake of controller design, a high-dimensional linear dynamic model in state space is built using Koopman operator. The high-dimensional linear model constructed is as follows: where z(k) = c(j) 2 R N is the state of the highdimensional system, and N is the dimension of highdimensional system.x(k) 2 R n is the estimation of the state j(k). A 2 R N3N , B 2 R N3m and C 2 R n3N are linear time-invariant matrices. According to the work by Korda and Mezic´, 23 an analytic solution to find A, B and C in (13) can be easily obtained.
Provide real state and control input data of the original nonlinear system and define data sets as follows: where j(k) and u(k) satisfy the relation shown by (10). The matrices A, B, and C in (13) can be obtained as the solutions to the following optimization problems: where j lfit = ½c(j(1)),:::, c(j(P)), Y lfit =½c(j(2)), :::, c(j(P + 1)): The analytical solutions to (15) are: Now, a Koopman model of the nonlinear system (10) is obtained by (13) and (16) which can be used to predict the future state and design the controller.
Remark 1. 23 If the basis observable functions  24 to discovery the basis functions from data, which shows that deep neural networks can be used to discover the basis functions actively and obtain an accurate approximation of the Koopman operator.
Remark 3. For the OMM control system, there is no positive correlation between the dimension of the lifted state-space N and the Koopman model accuracy. Therefore, in practice, the calculation cost and model accuracy should be balanced to select the appropriate dimension.
Remark 4. For more detailed information about equation (13), the readers can refer to the work by Korda and Mezic´. 23 Model predictive control for the OMM The model-based control method is the most mature and widely used control method among the many control methods. At present, MPC is the most popular model-based control design technique, which uses the model to predict the future output and optimizes control input within a finite time horizon, considering various constraints. The optimized input is applied to a single time step, and then iterate on the optimization. 25 The predictive control principles of linear and nonlinear systems are similar, that is, model-based prediction, online rolling optimization, and feedback correction. However, the optimization problem in nonlinear MPC suffers from heavy calculation burden due to a nonlinear cost function and nonlinear constraints.
Koopman high-dimensional model can transform nonlinear MPC into linear MPC, thus non-convex optimization is avoided. 26 is the position state of OMM, where x(k), y(k), and f(k) are three plane degrees of freedom representing the x-coordinate, y-coordinate, and rotation angle of the OMM respectively, while u 1 (k) and u 2 (k) are the two joint angles of the manipulator. y(k) = q(k)Àq(kÀ1) Dt 2 R 5 is the velocity state, which adopts the backward Euler method. Dt is the sampling time. Control input u(k) = u 1 (k) u 2 (k) u 3 (k) u 4 (k) u 5 (k) ½ T 2 R 5 is the vector consisting of the input voltages of five motors. The goal of trajectory tracking control of an OMM is to give a desired trajectory, and a controller is designed to enable the OMM to track the desired trajectory in real time under the action of the control input. In other words, under effective control, the real outputs (position and velocity) of the OMM at the moment can be infinitely close to the desired values. Based on the method mentioned above, the Koopman model (KM) of the OMM can be obtained as equation (13). The prediction equation for the future state of the high-dimensional system z can be written as follows: where N c is the control horizon, N p is the prediction horizon, z(k + ijk) and u(k + ijk) represent the predictive state and control input at time k, respectively.
Define y(k) as the output of the OMM system. For this system, the system output is the position, that is, y(k) = q(k). Then, according to equation (13), the predicted output is represented as: The prediction equation of the system is rewritten in the compact form as follows: wherê The predictive reference signals are given by: The objective of MPC is to minimize the following cost function: where Q and R are positive definite matrices, and Because the first term on the right hand of (22) is independent of U(k), it has: and where u i j j4u max represents the voltage constraints of the OMM system, limited by the DC motors, and The above equation can be solved as a standard linear quadratic programing problem, and the global optimal solution can be obtained quickly. By solving equation (24), the optimal voltage sequence U(k) in the predicted horizon N p can be obtained. The first element in U(k) is the output voltage at time k. Block diagram of the proposed control design is show as Figure 1.
In order to improve the trajectory tracking control performances of MPC, set Q N p 2 R 535 in Q = diag( Q a , Q a , :::, Q a zfflfflfflfflfflfflfflfflffl ffl}|fflfflfflfflfflfflfflfflffl ffl{ ) is the voltage optimization term. In practical application, Q and R matrices need to be adjusted, which can not only satisfy the high-precision trajectory tracking, but also make the actuator outputs meet the constraints.

Simulations
In simulations, a mathematical dynamic model established by Euler-Lagrange method is employed to approximate the real OMM. The approximate mathematical dynamic model in continuous-time form with voltage input is described as follows: where q = x y f u 1 u 2 ½ T is the position state of OMM, M 2 R 535 is the inertia matrix, C 0 2 R 535 represents the centrifugal and Coriolis matrix, G 2 R 531 is the gravity term, u = u 1 u 2 u 3 u 4 u 5 ½ T is the supplied voltage of five motors.
The input and output data are collected using random initial states and random control input sequences which can stimulate the robot's dynamic characteristics. The data set is established including the generated output data and control input data. Taking the current state, control input and output state data as a data set, a total of 23,500 sets of data are collected in the simulations used to calculate the high-dimensional Koopman model. The dimension of the lifted state-space is N = 12. Thin plate spline radial basis function with center at j 0 is chosen as basis function, that is, c(j) = j À j 0 k k 2 log ( j À j 0 k k). Then using the method proposed, Koopman model (13) is obtained, and MPC scheme is then designed based on the linear model.
Experiments Experimental setup Figure 4 shows the prototype platform. The omnidirectional mobile platform consists of three omnidirectional wheels arranged at 1208 intervals. Each wheel is actuated by a DC motor. The manipulator is a parallelogram arm with four links. The parallelogram arm has two degrees of freedom (i.e. u 1 and u 2 ), which are respectively driven by one DC motor. The five DC motors are identical and are Maxon DC motors with gear reduction ratio of 186 and the nominal voltage of 24 V. The proposed control approach is implemented on a personal computer (Intel(R) Core(TM) i7-4770 CPU@3.40GHz) via Matlab/Simulink. The control signals generated from a personal computer are then transmitted to the OMM via WIFI module (part NO. ESP8266). The MCU (part NO. STM32F103VET6) in the control box receives the control signals and then sends the corresponding pulse-width modulation (PWM) signal to the five motor drivers (part NO. LMD18200). A motion capture system (OptiTrack) is employed to measure the position and orientation of the OMM. Figure 5 shows the schematic of the experimental setup.

Data collection and model identification
In the experiment, irreversible damage may be caused to the motor if the control voltage input changes too fast. Thus it is not feasible to give a random voltage sequence directly, as in simulations. Therefore, in order to balance the randomness and smoothness of the voltage, a voltage generation strategy is designed. The voltage range of the motors for the mobile platform is between 224 and 24 V. Due to the limited movement space of the manipulator, the voltage is limited between 25 and 5 V in order to avoid the excessive movement speed. A matrix Y 531500 of uniformly distributed random numbers between the voltage range is proposed first. Then set the transition period T u1 or T u2 , which is much longer than the sampling time, as the interval of time between two adjacent elements of Y. In order to ensure the smoothness of the voltage signal, the random control inputs are obtained by followings: where k 1 = floor(t=T u1 ) and k 2 = floor(t=T u2 ) are the current indexes into the lookup  Figure 6, and the comparative results of the output state trajectory are presented in Figure 7. It is obvious that KM has better predicted performance than LM for the evolution of the system and its predicted state trajectory is closer to the real model. Accurate prediction capability can improve the MPC performances. In order to quantitatively illustrate the advantages of the KM in the experiments, relative root   mean squared error (RRMSE) is defined to evaluate the model accuracy: where T s is sampling period.
In the experiments, RRMSE was calculated to measure the approximation accuracy of the highdimensional linear model to the real OMM experimental system. Seven sets of the collected data were selected randomly to calculate the RRMSE of different trajectories respectively, and the average value was obtained. The calculation results of KM and LM are displayed in Table 1. The RRMSE results show that KM has higher modeling accuracy than LM of the OMM system. Averagely, the accuracy of KM is improved by about 25%, compared with LM.
Validations of the control effectiveness. In this part, experimental tests were carried out to verify the trajectory tracking performances of K-MPC. The desired trajectories used in experiments are the same as those in simulations. In the experiments, the parameters used in K-MPC were set as follows:   Experiments results are displayed in Figures 8 and 9. It can be seen that the OMM can complete the trajectory tracking task of the two reference trajectories, which validates the effectiveness of the proposed control design in the experimental environment.
In the complex and changeable practical application environment, it is more difficult to model and control the system. The experiments prove that K-MPC method provides an effective solution to achieve the modeling and control of complex nonlinear systems.

Conclusions
In this paper, a data-driven modeling and control method based on Koopman operator theory have been successfully applied to an OMM. Using EDMD-based Koopman operator approximation method, KM of the OMM system has been obtained firstly. The KM accuracy has been evaluated compared with LM qualitatively and quantitatively, which shows KM has higher accuracy. The K-MPC scheme has been designed and has been shown to be capable of commanding OMM to follow a reference trajectory in simulations and experiments. This method makes the modeling of the complex nonlinear dynamic systems more easier, leading to the rapid development of new control strategies and applications. To the best of our knowledge, this is the first experimental validation of Koopman-based MPC control for rigid manipulators.