Position Control of Flexible Joint Carts Using Adaptive Generalized Dynamics Inversion

: This paper presents the design and implementation of Adaptive Generalized Dynamic Inversion (AGDI) to track the position of a Linear Flexible Joint Cart (LFJC) system along with vibration suppression of the flexible joint. The proposed AGDI control law will be comprised of two control elements. The baseline (continuous) control law is based on principle of conventional GDI approach and is established by prescribing the constraint dynamics of controlled state variables that reflect the control objec-tives. The control law is realized by inverting the prescribed dynamics using dynamically scaled Moore-Penrose generalized inversion. To boost the robust attributes against system nonlinearities, parametric uncertainties and external perturbations, a discontinuous control law will be augmented which is based on the concept of sliding mode principle. In discontinuous control law, the sliding mode gain is made adaptive in order to achieve improved tracking performance and chattering reduction. The closed-loop stability of resultant control law is established by introducing a positive define Lyapunov candidate function such that semi-global asymptotic attitude tracking of LFJC system is guaranteed. Rigorous computer simulations followed by experimental investigation will be performed on Quanser’s LFJC system to authenticate the feasibility of proposed control approach for its application to real world problems.

were designed to be more complex. Parameter estimation techniques are the fundamental of adaptive control system and the way the estimated parameter is used determines their classification. Adaptive control system can be classified either as direct method when the estimated parameters are used directly in the controller, or indirect method when they were used only to calculate required controller parameters or hybrid method which is a mix between the first two.
One of the most popular adaptive controllers is the Model Reference Adaptive Controller (MRAC) which belongs to the direct adaptive control method. MRAC has a structure where an additional control loop called adaptation loop is added to the normal feedback structure to adapt to changes in the system dynamic as well as to compensate disturbances. Since its first implementation in 1958, MRAC has evolved and some of recent works on the controller can be found in [2][3][4].
One type of adaptive controller under the family of indirect method is Model Identification Adaptive Control (MIAC). The working principle of MIAC is to optimize the performance of a controller by identifying the system while it is running. This is very much similar to the concept of Self-tuning Regulators (STR) [5], in fact, the term MIAC was proposed to solve the interpretation issue of STR with another controller having similar concept called Self-optimizing Adaptive Control (SOAC) [6]. An example of MIAC implementation on Unmanned Aerial Vehicle (UAV) is discussed in [7].
The two controllers discussed earlier used single model as reference, there exist a type of adaptive controller that uses large number of models as references called Multi-model Adaptive Control (MMAC). Not all reference models will be used all the time though. At an instance, only one model that is closest to the plant is chosen. Recent examples of MMAC implementation include a Dynamic Positioning System for Quadrotor Helicopters and Simulator for Solid Oxide Fuel Cell Gas Turbine Power Plants [8,9]. There are also some proposals for a two-layer switching strategy in MMAC [10] and artificial intelligent (AI) based switching techniques such as fuzzy logic [11] and neural networks [12].
The usage of AI based technique in adaptive control is tempting as it generally provides a model free universal approximation. They were typically used together with classical controller to enhance their robustness, adaptivity to changes, and improve non-linear model approximation. Some examples are the adaptive fuzzy PID [13], adaptive fuzzy sliding mode [14], and neural adaptive PID [15].
There is still an exhaustive list of types of adaptive controller yet to discussed in this paper like gain scheduling, iterative learning control, adaptive pole placement, and extremum-seeking controllers. A brief review on the state-of-the art adaptive control systems can be found in [16][17][18].
In this paper, an inversion based AGDI control approach is applied for linear position control of LFJC system. A Moore-Penrose Generalized Inverse was used to parameterize the solution as the inversion could results in infinite number of solutions as given in [19][20][21]. An additional term based on Sliding Mode Controller (SMC) is included in the proposed controller as implemented in [19]. In all these references, a constant sliding mode gain is used in the additional term for its application to rotary servo cart and inverted pendulum systems. However, in this article, the authors have extended the previous work by implementing the adaptive sliding mode gain in the discontinuous control which adapts itself with respect to the changing environment for chattering reduction and to achieve improved tracking performance. The article has presented very first time the application of AGDI control on Quanser's LFJC system and the performance has been verified through both numerical simulations and experimental investigations. In Section 4, in-depth stability analysis of the controller has been presented to guarantee semi global asymptotic tracking performance. Results from computer simulations and practical experiments will be discussed in detail in Section 5. Finally, the paper is concluded in Section 6.

Mathematical Model of Linear Flexible Joint Cart System
An LFJC system as shown in Fig. 1 is a system of two carts sliding on a track with one of the carts is driven by a DC motor. It can be modelled as a two mass-spring system as illustrated in the schematic diagram in Fig. 2 where m c and m jc is the mass of the cart and the joint cart respectively, while x c and x jc is their respected position. The position of the cart is measured using a quadrature optical encoder. The linear force applied to the cart is denoted by F c whereas the spring linking the two carts has a constant denoted by K s  The differential equations of the system are given as: and where B eq and B eq jc are the equivalent viscous damping of the servo system and the LFJC respectively while J eq is the equivalent moment of inertia. The linear force, F c which is generated by the servo motor can be described by the following equation: The servo motor parameters in [3] are as defined in [1]. We can re-write (1) and (2) in the state-space form as in the following: and while the state variables and control variable are as follows: and

Controller Design
To track the linear position of LFJC system, a controller is designed to have two loops as shown in Fig. 3. In the outer loop, we employed an AGDI control law to provide position signal commands while the inner loop will use the signals to generate the required voltage to move the linear cart to its desired position.

GDI Control Law
By formulating constant time ordinary differential constraints, we begin our controller design: (14) where, c i (i = 1 to 4) are coefficients whose value should be selected appropriately in order for the constraint differential equation to achieve asymptotic stability. The term e (13) is an error function for the cart's position where and d denotes the actual and desired values. Similarly, the error function for the joint cart's position in (14) is e x jc = n 2 (x jc a − x jc d ) 2 . n 1 and n 2 on the other hand are positive real valued constant.
From the system's dynamic model in (6) and (7) and the constraint equations developed in (13) and (14), we can realize (15) by writing: Now, we can obviously solve V m by bringing the term N in (12) to the left and therefore invert it. This can't be done using the ordinary way as N is not a square matrix. To solve this issue, we apply a generalized method called the Moore-Penrose Generalized Inverse [18] as follows: However, there can exists infinite number of solutions for V m , therefore by using the Greville method, the solution is parameterized as in the following: where λ is the null control and P is the null projection given by the following equation: Note that, the same control law is applied in both controller loops.

Robust Controller Design
In order to make the controller more robust, a technique similar to SMC is employed to augment the controller. For that, a set of sliding surface vector function for both outer and inner controller loop is defined as in the following: Therefore, the derivative of the vector functions are as follows: Note that subscripts i and o is used to represent the inner and outer loop part of the controller respectively. By setting the derivatives of the sliding functions as in (21) and (22) to 0, the constraint dynamic equations in (13) and (14) can now realize its asymptotic stability. This leads to the following definition: Finally, based on the sliding vector functions in (19) and (20) and considering the expression in (17), our switching control law was derived based on the rate achieving law, yielding the following: where C o and C i are the gains for both outer and inner loop of the controller. The adaptive mechanism of these gains will be discussed in the next sub-chapter.

Adaptive Controller Design
The designed controller were made adaptive by introducing an update mechanism for the gains in (24) and (25) which equations given as follows: where V m oeq and V m ieq represent the nominal GDI controllers given by (24) and (25) respectively while η o and η i ensure the reaching condition by bounding the disturbances.Ĉ o andĈ i are the adaptive modulation gains which the update mechanism is given as: with k 1 , k 2 , k 3 , k 4 , and o , i are all constant positive scalar gains.

Stability Analysis
To guarantee stability of the controller, the error vectors e x co , e x jco , e x c i , e x jc i must be converge finitely. For that, the value of C o and C i must be carefully selected. By substituting equation in (24) and (25) into (23), the following will be obtained: Substitute P = I − N + N into (30) and (31) yields: where π N = NN + = 1 and I is an identity matrix. Based on the expression in (16), we can conclude that: for all N = 0, and Next, we intend to prove that the sliding mode dynamicsṠ in (32) and (33) can achieve asymptotically stability by performing Lyapunov stability analysis.
Let the positive definite Lyapunov energy function is defined as: By substituting the (32) and (33) into the derivatives of Lyapunov function in (36) yields the following: According to the Lyapunov's direct method, asymptotic stability stability of S can be guaranteed whenV is negative definite therefore, C o and C i must satisfies the following: The sliding mode dynamics in (30) and (31) can be converged as the error vector e converge which as a result implying the condition in (35). Therefore: It can be observed that from (41) that it is not possible to obtain SMC gains which guarantees asymptotic stability. However, with suitable selection of the gains, we can let the controller to achieve a semi global practical stability. Let us assess the outer loop controller case according to the following theorem: Theorem 1: for every real number π N * ∈ (0, 1) there exists a real number η o * > 0 such that the time derivative of V along the solution trajectories of the sliding mode dynamic given by (32) is strictly negative for all π N > π N * and η o > η o * Proof: Define π N * ∈ (0, 1) , while η 0 is defined as in the following: It follows that η o > η o . whenever π N > π N * . Accordingly let D o be a neighbourhood of (e x c ,e x jx =(0, 0), and choose sliding gain constant η o * such that ThenV o < 0 holds true along any closed loop trajectory that initiates within D o whener π N > π n * existence of a finite number η o * is guaranteed for any domain D o because M is globally bound which eventually leads to globally bounded e x c and e x jc trajectories respectively.

Theorem 2:
Consider the closed-loop dynamical system of the LFJC given by (6) and (7). If the controlled voltage V m given by (24) is applied, then the equilibrium point e = 0 of the closde-loop dynamics is semi-globally practically stable.

Proof:
To prove Theorem 1, the matrix bound ||π N * || can be arbitrarily selected closer to zero by choosing the gain such thatV o < 0, whenever the specified condition π N ≥ π N * is satisfied, the bound holds along any closed-loop trajectory in the neighbourhood D of e = 0. In order for an error state trajectory e to fall within the defined domain π N < π N * in finite time and prevail within that domain, it follows that reducing the value of ||π N * || arbitrarily closer to zero implies driving the error vector e arbitrarily closer to zero and making it uniformly ultimately bounded, i.e., making practically e stable. Moreover, because D o can be arbitrarily expanded by increasing C o , then this practical stability is semi-global.

Results
To evaluate the performance of the designed controller, we perform numerical simulations with step and sine wave input. The same scenario is then repeated in the practical experiment on a real system. Two other controllers namely the GDI and Linear Quadratic Regulator (LQR) were also developed and tested in both simulations and experiments to provide comparison to the designed controller.

Simulation Results
The LFJC system is simulated based on the dynamic model given in (6)(7)(8)(9) with the parameter's value given in [1]. First, the system model is tested with 0.2 Hz square-wave input with amplitude at 0.02 m. Results as shown in Fig. 4a demonstrates that the cart able to track the reference input when the proposed controller is employed. This was achieved with minimum oscillation as suggested by the results in Fig. 4b. Then, sine-wave is used with the same frequency and amplitude as in the previous simulation and the results is as shown in Fig. 5. Here, the superiority of the proposed controller over GDI and LQR are obvious. The proposed controller's adaptivity is also evident especially for joint cart position as shown in Fig. 5b where a little oscillation was only observed in the first 1.5 s it before smoothly follows the set-point. The superiority of AGDI over the other two controllers are further proven by comparing their Integral Time Absolute Error (ITAE) as shown in Tabs. 1 and 2.   The input voltage generated in response to the set-point is shown in Fig. 6. Despite a little spike recorded in response to the square-wave set-point when the cart started to change its position, the voltage input was well within the allowable limits.

Experimental Results
The same scenario as in the simulation is tested on a real equipment where the experimental set-up is as shown in Fig. 7. The set-up consists of a Linear Flexible Joint Cart system as described in Section 2, an amplifier to provide sufficient power to the motor and sensors, and DAQ board for transmitting control signals from Matlab interface to the system and receiving measured data from the encoders.  The experimental results for the proposed controller are shown in Fig. 8 for square-wave reference input and in Fig. 9 for sine-wave reference input. It can be observed from the results that the performance of all controllers was not as good as in the simulation especially with sine-wave reference input. The proposed controller, however, performs the best compared to the other two with LQR at the other end. This fact is backed by the ITAE measurement as shown in Tabs. 3 and 4.   Figs. 8c and 9c show the input voltage generated in response to the input reference during the experiment. For square-wave set-point, it is similar to the one in simulation where voltage spike followed by a little oscillation is recorded when the cart starts to move except that this time the voltage spike produced by LQR was too high that it could harm the system. On the other hand, the input voltage oscillates almost all the time in order for the cart to move continuously to track the sine-wave input reference.

Conclusion
A two-loops adaptive controller based on GDI has been successfully implemented in tracking the linear position of LFJC system. The proposed AGDI control law contains two control elements. Laws of Control established using a baseline (continuous) control law designed to reflect control objectives. The baseline law derives from the conventional GDI approach and is based on the rules for GDI. By applying Moore-Penrose generalized inversion to the prescribed dynamics, the control law is established. The introduction of adaptation modulation gain has made the controller able to adapt to changes in the system. The superiority of the proposed controller over GDI and LQR was proven by the simulation and practical experimental results. However, there are still room for improvements especially in minimizing the oscillation produced by the input voltage due to the continuous movement of the cart.