Control of a Lightweight Flexible Robotic Arm Using Sliding Modes

This paper presents a robust control scheme for flexible link robotic manipulators, which is based on considering the flexible mechanical structure as a system with slow (rigid) and fast (flexible) modes that can be controlled separately. The rigid dynamics is controlled by means of a robust sliding-mode approach with wellestablished stability properties while an LQR optimal design is adopted for the flexible dynamics. Experimental results show that this composite approach achieves good closed loop tracking properties both for the rigid and the flexible dynamics.


Introduction
Flexible-link robotic manipulators have many advantages with respect to conventional rigid robots. These mechanisms are built using lighter, cheaper materials, which improve the payload to arm weight ratio, thus resulting in an increase of the speed with lower energy consumption. Moreover these lightweight arms are more safely operated due to the reduced inertia and compliant structure, which is very convenient for delicate assembly tasks and interaction with fragile objects, including human beings. However, the dynamic analysis and control of flexiblelink manipulators is much more complex than the analysis and control of the equivalent rigid manipulators. From the modelling standpoint, the challenges are associated with the fact that the non-linear rigid body motions are now strongly coupled with the distributed effects of the flexibility along the mechanical structure. This coupling varies with the system configuration and the load inertia. Besides, the dynamic equations of flexible structures are infinite dimensional, although for control purposes approximated finite order models are usually considered. This truncation, along with the difficulties in modelling the coupling and nonlinearities of the system, can be the source of uncertainties in the dynamical models, which in turn can lead to poor or unstable control performance. In addition, for a flexible-link manipulator the number of controlled variables is strictly less than the number of mechanical degrees of freedom, so the control aim is double in this case. First, a flexible manipulator controller must achieve the same motion objectives as a rigid manipulator. Second, it must also stabilize the vibrations that are naturally excited. Moreover, if the tip position is chosen as the system output, flexible links arms are non-minimum phase systems (Wang, D. & Vidyasagar, M. 1991, Moallem, M;Patel, R.V. & Khorasani, K. 2001), which implies that the conventional robot control methods based on feedback linearization cannot be applied to flexible manipulators. The existence of the slow (rigid) and fast (flexible) modes allows the application of the singular perturbation theory to flexible arms (Kokotovic, P;Khalil, H.K. & O'Reilly, J. 1999). Using this approach, the system dynamics is decomposed into a slow and a fast subsystem. Then, a composite control strategy can be adopted, with the controller having slow and fast terms. Since the slow subsystem has the same structure and properties than the equivalent rigid arm, the slow control can be based on well-established control schemes for rigid manipulators, while the fast control can be synthesized as a linear control with the slow state variables acting as parameters. This combined slow-fast strategy has proved to be a promising control method for robotic applications (Li, Y.;Tang, B.;Zhi, Z. & Lu, Y. 2000, Lizarraga, I. & Etxebarria, V. 2003. In this paper robust control strategies are applied to a flexi-ble-link manipulator within the singular perturbation framework, in contrast with other approaches that have appeared in the literature, which mainly use adaptive control (Yang, J.H.;Lian, F.L. & Fu, L.C. 1997, Bai, M;Zhou, D.H. & Schwarz, H 1998). In the present paper, a sliding-mode controller is designed for the slow subsystem and an optimal LQR strategy is proposed for the fast subsystem. This kind of sliding control scheme was introduced in (Ba-rambones, O. & Etxebarria, V. 2001) for the tracking control of rigid manipulators. It consists of an adaptive term, which is a feedback linearization law for the modeled dynamics, and a sliding term, which is used to overcome the uncertainties. In order to prevent the high frequency chattering, a smooth function is considered instead of the sign function. An adaptive sliding gain can be used to avoid the necessity of a priori knowledge of the unmodeled dynamics and noise bounds. On the other hand, the LQR controller for the fast subsystem is designed to stabilize the deflections of the flexible modes. The paper is organized as follows. Section 2 gives a finite dimensional model for a generic flexible-link manipulator, suitable for control purposes, together with its approximate representation through the slow and fast subsystems derived from the singular perturbation method. Then, in section 3 the proposed combined sliding-LQR control strategy based on the separate slowfast representation is presented. Next, the performance of the proposed design is illustrated in section 4 by means of experiments on a laboratory flexible arm. Finally, conclusions are given in the last section.

Model for flexible-link manipulators
Conventional rigid-link manipulators are modelled as a ser of nonlinear coupled ordinary differential equations (ODEs). However, in the case of flexible manipulators this rigid dynamics is coupled with the distributed effects of the flexibility along the mechanical structure, which lead to a model expressed in partial differential equations (PDEs), where both time and spatial derivatives are relevant. PDEs are not very convenient as models for control design purposes, since they are theoretically equivalent to infinite-dimensional systems. In order to derive a finite-dimensional ODE, the deformation of each link is expressed as a superposition of modes where the spatial and time variables are separated: where r q is the vector of rigid modes (generalized joint coordinates) and f q is the vector of flexible modes, respectively defined as: where n is the number of links and i m are the number of flexible modes considered for each link.
( ) M q represents the inertia matrix, ( , ) V q q is the Coriolis and centrifugal vector, K is the stiffness matrix, ( , ) F q q is the friction vector, ( ) G q is the gravity vector. ( ) B q is the input matrix, which depends on the particular boundary conditions corresponding to the assumed modes. Finally, τ includes the control torques applied to each joint. The dynamical equation (2) can be partitioned according to the rigid and flexible modes: where the following properties are known to be verified, by the Lagrangian structure of the system: V q q has been expressed as the product of a matrix by a vector: Applying the singular perturbation theory (Kokotovic, P;Khalil, H.K. & O'Reilly, J. 1999) the system dynamics can be decomposed into a slow and a fast subsystem. In particular, a singularly perturbed model of (4) can be obtained by introducing a small-scale factor ε defined as 1 1 Using these new variables, equation (4) can be rewritten: where the new matrices appearing in the expression are defined directly from the old matrices as follows: and: As mentioned in the introduction, a double control objective needs to be achieved. On the one hand, r q must track a prescribed trajectory. On the other hand, the elastic vibrations of the flexible modes have to be damped out. For that, a composite control law is defined: where τ is the slow component and τ is the fast component. In the following the bar over the variables is used to denote the slow part of them. The slow subsystem is obtained by setting 0 ε = in (7).
The second equation gives the slow manifold equation: and the first one gives the slow dynamics, that using expression (11) of the slow manifold it can be written: To derive the fast subsystem a time-scale change / T t ε = is performed and new fast variables are defined: In this new time scale the slow variables are treated as constants. Thus, from (7) and using (11), the following equations, which define the dynamics of the fast modes near the slow manifold, can be obtained: Note that the term 1 2 ff V εϕ , which is first order in the perturbation parameter and is usually neglected, has been explicitly considered in order to take into account the damping of the flexible modes. Now, if two matrices F A and F B are defined: and a fast state vector is defined as the fast subsystem can be written as: which describes the fast variables evolution around the slow manifold (11).

Control design
As pointed out before, the design of a feedback controller for the singularly perturbed model is developed according to a composite control strategy ( , ) ( 1, 2) r r q q τ τ τϕ ϕ = + , where τ is the control law for the slow subsystem (12) and τ is the fast control law that must satisfy the constraint (0, 0) 0 τ = (i.e. the fast controller is inactive along the equilibrium manifold (11) ). The design process for the two controllers is described in the following

Sliding-mode control for the slow system
The objective of the slow control consists of ensuring that the slow variables follow a prescribed trajectory. Since the slow subsystem (12) has the same structure and properties than the equivalent rigid arm, any trajectory tracking control method for rigid manipulators can be applied. One of the most widely used techniques for trajectory tracking of robot manipulators is the so-called computed-torque control through feedback linearization (Craig, J.J. 1986) . This method requires an accurate knowledge of the system dynamics. The presence of parametric uncertainties (due to estimation errors or time-varying parameters) or the unmodeled dynamics and disturbances that can affect the plant, can lead to poor or unstable control performance. Therefore, in the present work, a robust controller is applied to the slow subsystem. This controller was proposed for rigid manipulators in (Barambones, O. & Etxebarria, V. 2001). The control law consists of an adaptive feedback linearization term for the modeled dynamics of the system and a robust sliding control to overcome the uncertainties. Concerning the sliding control term, two specific characteristics need to be mentioned. First, the proposed sliding control prevents the chattering effect by smoothing out the control law, substituting the usual sign function by a saturation function. This chattering is especially undesirable for the slow subsystem, since it can result in the excitation of high frequency dynamics. This change introduces a boundary layer around the switching surface. The second particularity consists of an adaptive update of the sliding gain. This avoids the necessity of a prior knowledge of an upper bound of the unmodeled dynamics and noise magnitudes. The expression of the control law for the slow subsystem is given by: where the first term is the estimated nonlinear modelbased feedback introduced to compensate for the nonlinearities present in the robot. This term can be expressed as a regressor matrix ( , , , ) and the saturation function is given by the usual expression: The system dynamical parameters and the elements of the switching gain vector are updated according to the following laws: layer, there is not updating of the model parameters and the sliding gains. Moreover, the sliding term turns here into a proportional gain (consequently acting as a PD control law). This behavior is, however, not only not undesirable but very convenient. The adaptation process and the robust control action are only needed if the performance of the closed-loop system is far from the required goal. In the particular case of the slow subsystem it is crucial to select an adequate value of β (high enough) in order to avoid the chattering, which can excite high frequency dynamics. Note that the system decomposition into a slow and a fast subsystem has been performed under the time scale separation assumption. If the slow subsystem along with its control shows high frequency dynamics, the singular perturbation approach is no longer valid. Therefore, the control is tuned to take advantage, when needed, of the robustifying properties of the sliding term, but without introducing excessive control activity in the system unnecessarily, so that the time scale separation between the slow and fast dynamics are maintained. If the measured joint angles are chosen to be the rigid coordinates r q (so that by Property 3 in section 2 r B is the identity matrix), and assuming that it always can be defined a sufficiently high (unknown) is antisymmetic by Property 2 of section 2, its associated quadratic form is zero. Moreover, expressing the equation in terms of the regressor Y one obtains: And by the control law (17), taking into account we are outside the boundary layer: Thus V is a positive definite and decrescent function, which implies that the states 0 S , A and ρ are bounded.
Since A and ρ are bounded, then r q , r q ,Â and ρ are bounded. Also, since the closed loop dynamics can be written in terms of S : S is also bounded. Thus from (22) one concludes that V is bounded, so V is a uniformly continuous function, and from Barbalat's lemma we can conclude that 0 V → as t → ∞ , which from (22) implies that 0 0 S → as t → ∞ , or equivalently S converges to the boundary layer asymptotically. Thus, under the definition of S , the tracking error of each joint converge to a small size depending on the thickness i β for each joint.

LQR control for the fast system
The fast controller must stabilize the deflections of the flexible modes around the equilibrium manifold for the fast system (16), whose matrices F A and F B must form an stabilizable pair for any value of the rigid variables r q . This assumption is usually true in flexible manipulators, where the fast dynamics is normally marginally stable. The fast control law has the form: where the gains pf K and df K are designed using and LQR strategy in this paper. This optimal approach to the problem is well suited to deal with the damping of the flexible dynamics (16), since the control objective can be conveniently expressed as minimizing a cost function: where Q and R are the standard LQR weighting matrices, is the state of the fast subsystem (14), and τ is the fast part of the control law (10).
In this way, according to Tikhonov's Theorem, once stabilized the fast subsystem, the trajectories of the global system verify: so the proposed fast control law, which minimizes ϕ (and thus 2 ϕ ), stabilizes the deflections around the slow manifold.
The choose of the weighting matrices is related to the fast control law amplitude and the corresponding damping of the flexible modes. A suitable equilibrium between both values should be found. On the one hand, increasing the flexible modes damping needs a higher control effort. On the other hand this would result in a higher influence of τ on the rigid variable evolution ( ) r q t , disturbing the desired trajectory tracking. These opposed effects should be balanced so that the flexible modes are effectively damped, but without compromising the rigid control performance, in such a way that the time-scale separation between the fast and slow subsystems is maintained in the closed-loop.

Experimental results
The effectiveness of the proposed control scheme has been tested by means of real time experiments on a laboratory single flexible link. This manipulator arm, fabricated by Quanser Consulting Inc. (Ontario, Canada), is a spring steel bar that moves in the horizontal plane due to the action of a DC motor. A potentiometer measures the angular position of the system, and the arm deflections are measured by means of a strain gauge mounted near its base. The whole system, whose parameters are shown in Table 1, is displayed in Fig. 1. The dynamical modelling of the arm has been carried out through the measurement of the natural mode shapes and frequencies. The resulting state-space representation capturing the first two flexible modes is: It should be noted here that although this model is very ideal, and will not reflect all the complexities of the real experimental system, it is enough to design satisfactory controllers, as it will be shown by the experimental results. . For the design of the slow controller the friction effects acting on the rigid variables have been considered as unmodeled dynamics, to test the robustness properties of the sliding-mode slow controller. Finally the complete slow control has been implemented as shown in section 3.1 with 10 λ = and 1.3 β = . Regarding the fast LQR control, the design has been carried out solving the Riccati equations using the Control System Toolbox from Matlab (Mathworks, Inc., 2002) with the weighting matrices (150,500,1, 0) Q diag = and 2 R = . Experimental results are shown on Figs. 2 and 3. In Fig.  2 the control results using a rigid (slow-only) control design are displayed. As shown, the rigid variable tracks the reference (with a certain error), but the naturally excited flexible vibrations are not well damped (Fig.  2(c)), which is understandable as the manipulator is being treated here as if it were rigid. Also, within this rigid-only control framework, a stronger control action (in an attempt to make the rigid tracking error smaller) would, in turn, significantly worsen the flexible part response (the flexible vibrations would then be larger). Note that this rigid-only control results are similar to those obtained by conventional robot controllers such as PIDs. Fig. 3 shows the experimental results obtained when using the proposed combined rigid-flexible (slow-fast) control strategy. As seen in the graphics, the rigid variable accurately follows the desired trajectory, and moreover the flexible modes are now conveniently damped (compare Fig. 2(c) and Fig. 3(c)). This results in negligible deflections during the steady intervals of the rigid trajectory (i.e.: as shown in Fig. 3(c), vibrations are close to zero in the intervals which go from 1 to 2 seconds, 3 to 4 s., 5 to 6 s., 7 to 8 s., etc., which coincide with the steady up and down positions of the rigid variable). Also, the rigid part of the control can be retuned to get smaller rigid tracking errors (compare Figs. 2(a) (b) and Figs. 3(a) (b)) without compromising the flexible deflections damping. This reinforces the conclusion that the proposed combined sliding-LQR design provides better tracking properties than conventional robot control schemes, both in the rigid and in the flexible responses.

Conclusions
In this paper a composite robust-optimal controller for flexible-link manipulators has been proposed. As a first step, the system dynamics has been approximated by two reduced order subsystems by means of the singular perturbation theory. In order to take into account the uncertainties, unmodeled dynamics and disturbances that can affect the system, the controller has been designed using robust techniques. The slow subsystem, which describes the equivalent rigid arm dynamics, has been controlled by means of a sliding-mode controller. The dynamic knowledge is introduced in the control law through a feedback linearization term, but the model parameters are updated based only on the measured performance. And additional sliding term in the control law deals with the uncertainties and noise. For the fast subsystem an LQR control strategy has been proposed. This design takes into account the coupling between the slow and fast dynamics by means of a disturbance term affecting the input of the fast subsystem. The complete controller has been tested by means of real time experiments on a laboratory flexible arm. The experimental results have illustrated the suitability of the proposed control scheme, which has been shown to hold superior tracking properties and adaptation capabilities with respect to conventional rigid robotic control designs, while simultaneously damping conveniently the naturally excited flexible vibrations.