Robot Manipulator Control Using a Robust Data-Driven Method

: Robotic manipulators with diverse structures ﬁnd widespread use in both industrial and medical applications. Therefore, designing an appropriate controller is of utmost importance when utilizing such robots. In this research, we present a robust data-driven control method for the regulation of a 2-degree-of-freedom (2-DoF) robot manipulator. The nonlinear dynamic model of the 2-DoF robot arm is linearized using Koopman theory. The data mode decomposition (DMD) method is applied to generate the Koopman operator. A fractional sliding mode control (FOSMC) is employed to govern the data-driven linearized dynamic model. We compare the performance of Koopman fractional sliding mode control (KFOSMC) with conventional proportional integral derivative (PID) control and FOSMC prior to linearization by Koopman theory. The results demonstrate that KFOSMC outperforms PID and FOSMC in terms of high tracking performance, low tracking error, and minimal control signals.


Introduction
Robotic manipulators are highly utilized in various industries, such as automotive and medical.These robots are in high demand and are often deployed in conditions where they encounter external disturbances.Therefore, designing a suitable control method is the most critical aspect of the robotics design process.Many control methods are applied to robot manipulators to guide them along the desired trajectory, including the PID controller [1][2][3][4], sliding mode control [5][6][7], and fuzzy PID control [8][9][10], among others.These mentioned control methods depend on the dynamic model of the robot manipulator.However, designing certain control methods, such as the model predictive controller and conventional sliding mode control, requires an accurate dynamic model.Data-driven methods are strong approaches that can approximate the dynamic model to generate precise model characteristics.
Carron et al. [11] have introduced a model-based control method that utilizes data acquired from actual operations to enhance the robotic arm's model and tracking performance.The foundations of this approach are inverse dynamics feedback linearization and a data-driven error model, which are incorporated into a formulation for model predictive control.They also demonstrated how incorporating a Gaussian process into a nominal model can enable offset-free tracking.To achieve trajectory tracking control of the manipulator, the Gaussian process feedback linearization approach, based on the updating of the event-triggered model, is applied in a manipulator system with three degrees of freedom [12].To address the challenge of extensive Gaussian process regression computation with large data samples, sparse Gaussian process regression is employed for real-time manipulator trajectory tracking.It should be noted that the controllers proposed in [11,12] lack robustness against external disturbances, and it is important to compare these proposed methods with conventional controllers to assess their performance.
The Koopman theory is a robust method for data-driven control techniques.It has the capability to linearize complex nonlinear dynamic models.Several researchers have incorporated the Koopman theory into their studies to achieve enhanced control performance [13][14][15][16][17].However, a critical aspect of applying the Koopman theory is the design of the Koopman operator.The Dynamic Mode Decomposition (DMD) method is one of the valuable techniques that can be employed to construct the Koopman operator.Extended Dynamic Mode Decomposition (EDMD), introduced by Junker et al. [18], allows for the approximation of a nonlinear dynamical system as a linear model.Given the widespread use of linear system descriptions in control engineering applications, this technique is particularly well suited for such purposes.Junker et al. [18] conducted a simulated analysis of the prediction performance of the learned EDMD models using academic examples.They demonstrated how crucial system properties, such as stability, controllability, and observability, are reflected in the EDMD model.This reflection is a critical prerequisite for a successful control design process.Furthermore, they presented experimental findings on a mechatronic test bench and evaluated the applicability of their results to the control engineering design procedure.
Within the realm of data-driven Koopman operator-based nonlinear robotic systems, Shi and Karydis [19] propose ACD-EDMD, a novel approach for the Analytical Construction of Dictionaries of Appropriate Lifting Functions.The primary discovery in this study is that Hermite polynomial-based lifting functions can be constructed by leveraging knowledge of the fundamental topological spaces of the nonlinear system.They demonstrate that when observables are bounded and weighted, the suggested approach produces dictionaries with proven completeness and convergence guarantees that are easy to implement.ACD-EDMD is evaluated using various nonlinear robotic systems, including both simulated and real hardware experiments.To address the limitation of this approach and extract the leading Koopman eigenvalues, eigenfunctions, and modes of the unforced system, Williams et al. [20] describe a modified version of EDMD that accounts for the effects of actuation.They illustrate the effectiveness of this method using two examples: the Duffing oscillator and a lattice Boltzmann code approximating the Fitzhugh-Nagumo partial differential equation, which demonstrates Koopman mode and eigenvalue computation under (quasi)-periodic forcing.However, while the Koopman theory offers numerous advantages, its limitations can be described as follows: 1-Control constraints: Koopman control may not easily accommodate control constraints, such as safety limits on system states or control inputs.Ensuring that the control strategy remains within these constraints can be challenging.2-Computational complexity: solving the Koopman control problem can be computationally intensive, particularly for high-dimensional systems.Real-time control implementation may be limited by computational constraints.
In recent years, the emergence of fractional calculus has significantly reshaped the landscape of mathematical analysis and its applications.Fractional calculus extends traditional notions of differentiation and integration to non-integer orders, introducing a powerful framework for modeling complex systems with long-range dependence, memory effects, and anomalous diffusion.In this paper, we incorporate the principles of fractional calculus into our research, leveraging its mathematical richness to provide deeper insights into sliding mode control.By embracing fractional calculus, our aim is to enhance control accuracy, improve stability, bolster robustness, and achieve high tracking performance.
This research makes the following contributions: 1-The application of Koopman theory to linearize the nonlinear dynamics of the 2-DoF robot manipulator.2-The use of the DMD method to obtain the Koopman operator.3-The proposal of a fractional sliding mode control to regulate the linearized dynamics model based on Koopman's theory.4-Implementation of conventional PID and FOSMC controllers to assess the performance of the proposed control method.
The rest of the paper is organized as follows: Section 2 describes the nonlinear model of the 2-DoF robot manipulator.Section 3 introduces the PID controller.Section 4 discusses FOSMC.Section 5 delves into Koopman theory.Section 6 explains the DMD method.Section 7 demonstrates KFOSMC.Section 8 presents simulation results and Section 9 concludes the paper.

Dynamic Model of 2-DoF Robot Manipulator
Robots have the potential to enhance productivity, efficiency, product consistency, and quality in a variety of situations.Unlike humans, robots do not experience boredom and can tirelessly perform repetitive tasks until they wear out.Robot manipulators have numerous applications, including exoskeleton robots [21] and refueling robots [22].
q ∈ R 2 represent the position, velocity, and acceleration of the joints, respectively, and M(q) ∈ R 2×2 is known as the generalized inertia matrix, N q, .q ∈ R 2×2 is the vector of Coriolis and centrifugal forces, G(q) ∈ R 2×1 is the gravitational vector, and τ ∈ R 2×1 is the joint torques.M(q), N q, .q and G(q) are given in Appendix A. Equation ( 1) can be defined as: ..
The 2DoF robot manipulator structure is shown in Figure 1.It is possible to rearrange the dynamic equation for a 2-DOF robot manipulator as follows: ..
q − CG(q), which includes unmodeled dynamics and external disturbances.
Fractal Fract.2023, 7, x FOR PEER REVIEW 3 of 15 3-The proposal of a fractional sliding mode control to regulate the linearized dynamics model based on Koopman's theory.4-Implementation of conventional PID and FOSMC controllers to assess the performance of the proposed control method.The rest of the paper is organized as follows: Section 2 describes the nonlinear model of the 2-DoF robot manipulator.Section 3 introduces the PID controller.Section 4 discusses FOSMC.Section 5 delves into Koopman theory.Section 6 explains the DMD method.Section 7 demonstrates KFOSMC.Section 8 presents simulation results and Section 9 concludes the paper.

Dynamic Model of 2-DoF Robot Manipulator
Robots have the potential to enhance productivity, efficiency, product consistency, and quality in a variety of situations.Unlike humans, robots do not experience boredom and can tirelessly perform repetitive tasks until they wear out.Robot manipulators have numerous applications, including exoskeleton robots [21] and refueling robots [22].

Problem Statement:
The primary objective of this research is to design a control system that achieves asymptotic stabilization for the 2-DoF robot manipulator.Asymptotic stabilization implies that the robot manipulator should track the desired trajectory, denoted as q d (t), and ap- proach it as time t approaches infinity (t → +∞), while maintaining bounded values for its state variables and control inputs.In mathematical terms, the problem can be formally stated as follows: Design a control law u(t) such that the system's state q(t) approaches the desired trajectory q d (t) as t → +∞, while ensuring that q(t), q d (t), and u(t) remain bounded and the tracking error q(t) − q d (t) converges to zero.
The solution to this problem involves the development of a control algorithm, which may include elements such as trajectory planning, feedback control, and disturbance rejection, while considering the physical limitations and constraints of the robot manipulator.
Addressing this problem is crucial for enhancing the performance and precision of 2-DoF robot manipulators in various applications, such as manufacturing, automation, and robotics, where accurate trajectory tracking is essential for task execution and safety.In the subsequent sections, we will delve into the control strategies and approaches employed to tackle this problem, along with simulation results and experimental validations.

PID Control Model
The PID controller has been highly used in industrial companies due to its easy implementation and low cost.The PID controller can be defined as: where K p , K i , and K d are proportional, integral, and derivative parameters.Moreover, the tracking error can be defined as: where q d is desired trajectory tracking.The main drawbacks of the PID controller are that it is not robust against external disturbances and has low trajectory tracking.

Fractional Order Sliding Mode Control
FOSMC is a robust control method against external perturbations and demonstrates high tracking performance.Its primary advantage, when compared to conventional sliding mode control, lies in its ability to incorporate fractional derivatives or integrals of the error.
The key aspect of FOSMC design involves selecting the fractional sliding mode surface as: where α and β are positive constants and D is the Grunwald-Letnikov fractional operator.The Grunwald-Letnikov fractional derivative of the function e(t) with respect to t is given as , where the fractional order operator parameters µ and k will be obtained by . The FOSMC contains two control sections: equivalent control and reaching control law.The equivalent control method can be obtained by equaling the derivative of the sliding mode surface to zero.Taking derivative from Equation (8) results in: .
By equaling Equation (11) and d(t) to zero, the equivalent control can be obtained as: The equivalent control solely is not able to suppress the external disturbances.Therefore, a reaching control law will be implemented to solve that problem.The reaching control law is introduced as [25]: Therefore, the FOSMC is defined as: The proposed control method's stability can be proved by using the Lyapunov theory as: The condition for stability satisfaction is as follows: .
Equation ( 21) satisfies the condition in Equation ( 16).Therefore, the proposed controller is stable.

Koopman Theory
The key to successfully solving a nonlinear dynamical system, according to the Koopman operator theory, is to convert the nonlinear system's original form into an infinite dimensional state space, resulting in a linear system [26].Consider a continuous-time dynamical system as .
x = f (x).The discrete time definition of the dynamic is [27]: where F is characterized by: The dynamics of the original system become linear when the dynamics of a finitedimensional nonlinear system is transferred to an infinite-dimensional function space.In an infinite-dimensional Hilbert space, g is an observable and a real-valued scalar measurement function.Based on this observable, the Koopman operator generates as follows: A continuous system can be utilized to implement smooth dynamics.
in which K is the Koopman operator.due to the Koopman operator's unlimited dimensions, which is important yet troublesome for operation and representation.Applied Koopman analysis roughly approximates the evolution of a subspace covered by a limited number of measurement functions rather than detailing the development of all measurement functions in a Hilbert space.By constraining the operator to an invariant subspace, the Koopman operator may be represented as a matrix with limited dimensions.Any combination of the Koopman operator's eigenfunctions can cover a Koopman invariant subspace [27].When the Koopman model's eigenfunction ϕ(x) satisfies eigenvalue λ: A Koopman eigenfunction ϕ(x) is satisfied in continuous time.
To approximate the Koopman operator, a finite-dimensional approximation is needed on the application side.The DMD technique is one way that can estimate the Koopman operator [27].Here are some conditions under which it is acceptable to use the linearized model obtained by Koopman theory: 1.
Local linearity: the Koopman theory linearization is typically valid only in the vicinity of equilibrium points or limit cycles of the nonlinear system.Therefore, it is acceptable to use the linearized model when you are interested in studying the system's behavior near these points.

2.
Small perturbations: the linearized model is a good approximation when the system experiences small perturbations around a stable equilibrium.In such cases, the linearized model can provide insights into the stability and local behavior of the system.

3.
Short-time predictions: if you are interested in short-term predictions or analyzing the system's behavior over a relatively small time interval, the linearized model can be acceptable.It often provides accurate predictions for short time horizons.4.
Reduced-order modeling: Koopman theory can be used to reduce the dimensionality of a high-dimensional nonlinear system, creating a lower-dimensional linearized model that retains important dynamics.This can be valuable for simplifying complex systems while preserving critical behaviors.

DMD Method
DMD uses a robust numerical technique to approximate the Koopman operator.
where X is time shift of matrix X as: 28) may be used to determine A as follows: where the Moore-Penrose pseudoinverse is represented by +.Because a normal calculation utilizing A would need a substantial amount of processing because of its enormous n, we may utilize singular value decomposition (SVD) on the snapshots to identify the dominant characteristics of the pseudoinverse of X [28].
where U ∈ R n×r , Σ ∈ R r×r , V ∈ R n×r , and * demonstrate the conjugate transpose.SVD's reduced rank for approximating X is r.The eigenvectors can be defined as: where W is eigenvectors of full rank system dynamic systems.
Let λ be eigenfunction, then we will have: where K is the Koopman operator.The demonstration of the linearized dynamic model is as follows: where y is the state variable of the linearized system.

Koopman Fractional Sliding Mode Control
The proposed control method block diagram is shown in Figure 2. The fractional sliding mode surface for the linearized dynamic model by Koopman theory can be defined as: where the e k is the tracking error as: where y d is the desired trajectory.
Taking the derivative of the fractional sliding mode results in the following equation: .
Equaling Equation (39) to zero and simplifying it produces: as: () =   () +     () +  −   () where the ek is the tracking error as: where   is the desired trajectory.The equivalent control is not able to suppress external disturbances.The reaching control can be defined as: where K rk is the reaching control gain that is positive constant.The KFOSMC is defined as: The stability of the proposed control method can be proved by using Lyapunov theory as: Taking derivative from Equation (43) produces: .
Equation ( 49) demonstrates that the proposed control method is stable.

Simulation Results
We simulated three controllers to show the performance of the proposed control method.The simulation was conducted in Matlab and using ode 45 order.The time span is [0 20].The robot's specifications are M 1 = M 2 = L 1 = L 2 = 1 and g = 9.81 m/s.The PID controller parameters are selected as K p = diag{40, 40}, K i = diag{10, 10}, and K d = diag{20, 20}.The FOSMC controller parameters are chosen as K r = 10, α = 10, β = 5, and µ = 0.75, with the KFOSMC parameters being the same as FOSMC.These parameters were obtained through the designer experiences and trial-error.The desired trajectory tracking is q d = y d = sin(t).The initial conditions of joints are q 1 = π 2 , q 2 = π 4 .The linearized Koopman operator is obtained as:  3 shows the trajectory tracking of joints 1 and 2 under PID, FOSMC, and KFOSMC.It demonstrates that the KFOSMC has better trajectory tracking performance in comparison with PID and FOSMC controllers.The KFOSMC shown with a red line in Figure 3 has high tracking performance that covers the green line completely.Figure 4 shows the trajectory tracking error of joints 1 and 2 under PID, FOSMC, and KFOSMC controllers.For example, the tracking error in joint 1 at a time of 4 s under PID controller is around 0.5 but, under KFOSMC, is equal to zero.Moreover, for that joint, FOSMC creates oscillation but, by applying KFOSMC, there are no tracking errors.Therefore, the tracking error under KFOSMC is zero in comparison to two other controllers.Figure 5 shows the velocity of joints 1 and 2 under PID, FOSMC, and KFOSMC controllers.Figure 6 shows the control signals under PID, FOSMC, and KFOSMC controllers.The control signals using KFOSMC reduced significantly in comparison with two other controllers.Figure 3 shows the trajectory tracking of joints 1 and 2 under PID, FOSMC, and KFOSMC.It demonstrates that the KFOSMC has better trajectory tracking performance in comparison with PID and FOSMC controllers.The KFOSMC shown with a red line in Figure 3 has high tracking performance that covers the green line completely.Figure 4 shows the trajectory tracking error of joints 1 and 2 under PID, FOSMC, and KFOSMC controllers.For example, the tracking error in joint 1 at a time of 4 sec under PID controller is around 0.5 but, under KFOSMC, is equal to zero.Moreover, for that joint, FOSMC creates oscillation but, by applying KFOSMC, there are no tracking errors.Therefore, the tracking error under KFOSMC is zero in comparison to two other controllers.Figure 5 shows the velocity of joints 1 and 2 under PID, FOSMC, and KFOSMC controllers.

Conclusions
This paper proposed a new data-driven control method to control a 2-DoF robot manipulator.The robot manipulator is highly nonlinear.The Koopman theory was used to linearize the nonlinear dynamic model of a 2-DoF robot manipulator.The DMD method was applied to obtain the Koopman operator.Then, PID and FOSMC were used to show the controller performance before using the Koopman theory.The simulation results demonstrated that the proposed control method has better performance in terms of high tracking performance, low tracking error, and low control signals in comparison with PID and FOSMC controllers.

Figure 2 .
Figure 2. The proposed control method block diagram.Figure 2. The proposed control method block diagram.

Figure 2 .
Figure 2. The proposed control method block diagram.Figure 2. The proposed control method block diagram.

Fractal 4 .
Fract.2023, 7, x FOR PEER REVIEW 9 of 15 tracking is   =   = sin ().The initial conditions of joints are  1 The linearized Koopman operator is obtained as:

Figure 6 shows
Figure3shows the trajectory tracking of joints 1 and 2 under PID, FOSMC, and KFOSMC.It demonstrates that the KFOSMC has better trajectory tracking performance in comparison with PID and FOSMC controllers.The KFOSMC shown with a red line in Figure3has high tracking performance that covers the green line completely.Figure4shows the trajectory tracking error of joints 1 and 2 under PID, FOSMC, and KFOSMC controllers.For example, the tracking error in joint 1 at a time of 4 sec under PID controller is around 0.5 but, under KFOSMC, is equal to zero.Moreover, for that joint, FOSMC creates oscillation but, by applying KFOSMC, there are no tracking errors.Therefore, the tracking error under KFOSMC is zero in comparison to two other controllers.Figure5shows the velocity of joints 1 and 2 under PID, FOSMC, and KFOSMC controllers.Figure6shows the control signals under PID, FOSMC, and KFOSMC controllers.The control signals using KFOSMC reduced significantly in comparison with two other controllers.