Control of Flexible Robot by Harmonic Functions

: This work deals with the control of ﬂexible structures as underactuated systems. The invariant control method performs the control of a ﬂexible robot as a representative of an underactuated system with zero dynamics. The control input is separated into two parts. The arbitrary part of the control input is designed to control the directly actuated part of the dynamic system. The invariant part of the control is selected to steer the system zero dynamics in the desired way. The harmonic functions create the base for the invariant part of the control function. The residual vibration cancellation is the target of the presented invariant control strategy. The harmonic function frequencies are overtaken from the so-called natural motion, amplitudes are the results of the optimization process. The main target of this paper is to show the invariant control approach and its application to the system with ﬂexible elements.


Introduction
This paper deals with the control of flexible structures as underactuated systems. The definition of underactuation should be based on the number of blocks in the Brunovsky canonical form [1]. The invariant control-its idea is presented in [2]-is used for flexible robot trajectory tracking with minimal residual oscillations. The desired trajectory is parametrized, exact input-output linearization is applied to the system coordinates (modal coordinates are excluded), and outputs are substituted by function of parametrization variables. This transformation assures that the robot endpoint follows the desired trajectory. Zero dynamics (system flexibility) oscillations are realized only in the perturbation of parametrization variables. The invariant control, based on the harmonic functions [3], is applied to the model of a flexible robotic arm, and its parameters are obtained using predictive optimization.
Many authors have already investigated the control of underactuated mechanical systems. Neurodynamic programming, as a main part of the control in [4], is used for the control of the ball and beam system. In [5], a method of adding the actuators to the underactuated joints and running the swing-up motion with optimization minimizing the action of the added actuators is used. Sliding mode control extended with fuzzy logic is introduced in [6] to control the motion of overhead crane. An approach with optimal control is used in [7]. The adaptive approach used for tracking control is presented in [8]. Partly stable controllers derived using the dynamic model of the manipulator create basis for the optimal switching sequence control in [9]. An energy-based approach used in the design of stabilizing controllers is presented in [10]. Friction forces are used in the energy control strategy in [11]. Authors in [12] introduce an averaging theory for controlling the systems with and without drift terms. In [13], the trajectory tracking controller is used for following the upward trajectory created from the downward simulation (similar to the natural motion in [14] and the natural oscillations in [15] of a parallel robot) and stabilizing trajectory. An active disturbance rejection control is designed in [16] for a pendubot system. The walking-like trajectory tracking of an acrobot is continuously developed in [17]. A 3D bipedal gait walking robot is presented in [18], and the development of humanoid motion design is investigated in [19]. The robust sliding mode control is developed for stabilizing and trajectory tracking of a ballbot system in [20], and the wheel-legged biped robot motion is stabilized using active arm manipulator in [21]. The dynamic balancing of quadruped robot with optimal controller is presented in [22], and a different quadruped robot design is presented in [23]. Ref. [24] presents linear quadratic regulator applied to control vertical take-off and landing (VTOL) multi-rotor vehicle with passive rotor tilting mechanism. A control based on a function approximation technique using the variation of an approximated square system is presented in [25,26]. The cyclic control using sinusoids for nonholonomic systems is presented in [27] (stabilization), and motion planning is presented in [28]. The control of a wheeled, inverted pendulum is transferred into dynamic trajectory planning with a boundary value problem in [29]. State feedback fuzzy system controller, based on H ∞ , is investigated in [30]. The underactuated mechanisms in the gravity field can be controlled in their equilibrium positions (see [31]), but there are always singularity points between these equilibrium states. To move the mechanism through this region (see [32]) is a challenging task, and the work in [14] shows one possible way to overcome it. The investigation of system flexibility as a system underactuation is usually investigated with linearized stiffness; the authors of [33] deal with dynamic coupling of such underactuated manipulators. Modelling flexibility in underactuated systems by a rotational spring is presented in [34], and a similar flexibility model is investigated in [35], where the spring stiffness is varied, and a point stabilization control is developed. A model with linear springs is investigated in [36], where input-output linearization is performed along with a PID controller. Sliding mode control is used to control the flexible robotic arm in [37]. The current work aims to introduce the invariant control strategy to the structures with compliancy (chain of flexible robotic arms). The nonlinear system with flexible modes is obtained using the procedure presented in [38].
An invariant control is presented in [2]. The application of such control to the underactuated system (double pendulum, double pendulum on a cart) is shown in [14,39]. The current work does not include the flexible structures and does not deal with trajectory tracking. This paper aims to introduce the control strategy to the structures with compliancy-in our case, the flexible robotic arm. Another contribution of the paper is in its presentation of a control strategy which forces the undesired movements of the system into the desired system endpoint trajectory.
The paper is organized as follows. The exact input-output linearization is presented in the Section 2 for underactuated systems. Next, the coordinates are separated into actuated and unactuated. Then, consecutive output parameterization is introduced. Section 2.1 introduces invariant control with harmonic functions and the natural motion used for the Eigen frequency evaluation. Section 3 introduces the presented method to flexible robotic arm: modelling and parameterization with input-output linearization is applied to the flexible robot. Next, the particular control application to the flexible robotic arm and simulation results are presented. Section 4 concludes the work.

Materials and Methods
The control of underactuated, flexible structure using invariant control is presented.

Exact Input-Output Linearization with Parametrization
Let us consider a nonlinear dynamic system (Eigen equations of motion): where the matrix M[n × n] is an inertia matrix; q[n × 1] are coordinates describing the system;q andq their time derivatives; F[n × 1] is a matrix containing forces dependent on velocities and external forces besides control inputs; B[n × k] is the control input distribution matrix; the vector u[k × 1], k < n contains the control inputs. The state vector q could be rewritten without loss of generality in the following way: where q a has the same dimension as the rank of matrix B. Remaining z coordinates in vector q z represent not directly actuated states (zero dynamics). This coordinate selection is generally not unique. The system (1) could be rewritten as follows: where the matrix B a [a × a] is the largest regular sub-matrix of the matrix B with the rank a (the actuator redundancy is not covered, so a = k). The number of q z coordinates is z = n − a. The matrix dimensions in (3) and (4) are dependent on the lower indexes, and matrix B I z has dimensions [z × a]. Let us consider the vector of system outputs y of the same dimension as the vector q a . There is a relation between system outputs and system coordinates: with a vector f[a × 1] representing the dependence of the output on the system coordinates q a and q z . There exist the inverse relation f −1 , such that the coordinates q a and its second time derivative can be uniquely determined: where J y [a × a], J z [a × z] and S[a × 1] are matrices resulting the time derivatives. The outputs y are often parametrized, especially in robotics applications. The parametrized trajectory is defined: with the following output acceleration: where vector P[a × 1] is output parametrization and J p [a × p], T[a × 1] are time derivative resulting matrices with p equalling the number of parameters. The inputs u are expressed from (3) and substituted into (4), and then the second time derivative of q a , much like y from (7) and (9), are substituted, and the final set of equations is obtained: where The new input variable w is equal to the second time derivative of parameters vector p in order to provide input-output linearization. Then, the system inputs u are derived from the (10) and (11): with an assumption of the invertibility of M zz , which is always fulfilled for flexible mechanical systems.

Invariant Control
In this section, the control variable w is assembled. There is a dynamic system to be controlled (derived from the previous section): The input variable w directly influences parameters of p. However, how can the zero dynamics coordinates q z be controlled? The proposed way is to split the input variable into arbitrary part w A , which controls the parameters p, and invariant part w I , which controls coordinates q z , with specific influence on parameters p.
The arbitrary part is assembled to reach the final configuration at time, T. The invariant part must satisfy invariancy conditions (16). Hence it modifies parameters p and their time derivatives only inside the interval (0, T). The invariancy conditions are the following: If the input variable (15) is substituted into the (13), and the system of equations is integrated from t = 0 to t = T, then the following is obtained: From (17), it is obvious that parameters p and their time derivatives at the end (final) time depend only on the arbitrary part of the control (15). The arbitrary part w A could be arbitrarily chosen, just to fulfil the end position and velocities of the parameters p. After the selection of the arbitrary part of the control, it is a time-dependent part, and (14) changes into (18).q The invariant part of the control must fulfil the conditions of (16), and the control coordinates q z from (18) must reach the desired states at the end time, T. The suitable functions are the following harmonic functions: The parameters A i , φ i of harmonic functions (19) are obtained from the optimization process, and the frequencies, f i , are based on the so-called natural motion.

Natural Motion
According to [14], natural motion is derived from the vicinity of an unstable equilibrium to the vicinity of a stable equilibrium. The motion takes place in the gravity field with dissipative members instead of actuators. It is helpful to rearrange the formulation for the flexible systems. For obtaining the natural motion, it is used the simulation with zero invariant part w I , controlled only with the arbitrary part of the control w A . The system is moved from the initial position to the end position, where the system stays, and residual (zero dynamics) vibrations are exerted.
All system states are recorded during the motion, and the frequencies, f i , are obtained from the frequency analysis of the recorded behaviour.

Results
The present section introduces the presented procedure with invariant control to the flexible robotic structure.

Model of Flexible Robot
A flexible robot is modelled as a double pendulum with flexible arms. It consists of two flexible beams, interconnected by a revolute joint, and coupled to the base frame with the second revolute joint. Every beam has flexibility modelled by three modes. There are actuators in each revolute joint. The model covers the mass of the actuator, and the endpoint is loaded by extra mass. The system is situated in the gravity field, see Figure 1.
Eigen equations of motion of the flexible double pendulum are obtained using the procedure derived in [38]. The implementation is presented in [40]. The Eigen equations of motion are in the following form: Furthermore, matrix M is an inertia matrix, vector F covers velocity-dependent forces, gravity forces, and damping forces, and u 1 , u 2 are actuator moments. Beam k endpoint position is determined by angular rotation ϕ k and beam deflection d k . Beam deflection is obtained according to the following equation: where δ ki are dimensionless modal coordinates and Φ ki are coefficients of modal parameters beam deflection at particular point. The angular deflection of the first beam endpoint is needed for the determination of the second beam position. This endpoint angular deflection is indicated as θ, and generally where Ψ ki are coefficients of modal parameters, beam angular deflection at particular point. Angle θ 1 is the relative angle between the un-deformed shape of the first beam and its endpoint angular deflection (or endpoint tangent to deformed beam shape).

Input-Output Linearization with Output Parametrization
It is necessary to split the state vector x into x a and x z according to (2). The claim on the regularity of submatrix B a derived from matrix B in (20) directly implies the splitting of vector x: The flexible double pendulum endpoint coordinates x 2 and y 2 are system outputs y, and it corresponds with the length of vector x a . Input-output linearization can be accomplished. Outputs are obtained using the following relations: The coordinates in the vector x a are now changed to the x 2 y 2 end effector (double pendulum endpoint) coordinates. Equation (24) is used to obtain ϕ 1 ϕ 2 coordinates and its time derivatives according to (6) and (7) to be substituted into (20). Following one dimensional parametrization (typically endpoint trajectory, see (25)) ensures the endpoint position and leaves free movement along this parameter. Then, the zero dynamics control actions use this free parameter for realizing its unwanted movements.
The system inputs u = u 1 u 2 are obtained from (12), but the following procedure could also be used. Outputs functions (24) and their parametrization (25) are the secondtime derivate: In (26), the coordinates accelerationẍ are substituted from (20), and outputs accelerationẍ 2 ,ÿ 2 are replaced from (27). The control inputs are obtained from the resulting alternative expression: The right-hand side of (28) also depends on the state vector x and its time derivativė x. Therefore, inputs could also be evaluated according to (12) in the form with only p and x z coordinates.
The advantage of such a strategy is that flexible robot endpoint never leaves the prescribed trajectory, and zero dynamics (x z ) control actions are realized only along the parameter, p.

Control of Flexible Robot
The task is to move the flexible robot endpoint along the circle arc, see Figure 2. The circle centre is in the joint between the base frame and the first arm. The radius is r in (29), and the circle parameter p is angular position measured from the robot's initial position. At first, the arbitrary part of the control (w A ) is prepared. According to (13), the input is the second time derivative of parameter p. Design of arbitrary part of the control is based on the parameter p behaviour. The initial position and end position have velocities and accelerations selected to be zero. Such conditions satisfy a fifth-order polynomic in function p, see Figure 3. Movement duration is one of the free parameters, but it will be determined by the desired speed of the robot endpoint.

Natural Motion Frequencies
Natural motion is performed only with arbitrary part of the control w A with the duration of 1 s. When the robot reaches the end position, residual vibrations are measured, see Figure 4, left. It is evident that all system coordinates vibrate at just one natural frequency ( f N = 4.2915 Hz), and this is verified by the frequency analysis in Figure 4, right. For the different simulation times, the resulting natural motion frequency is the same.

Invariant Control Parameters
The invariant part of the control is constructed according to (19). The optimization process is performed to obtain the number of intervals f N −1 , natural frequency multiplication factors k i for obtaining particular f i , phase φ i , and corresponding amplitudes A i . The phase φ i = −0.5π is same for all frequencies f i . The objective function OF aims to fulfil the prescribed trajectory endpoint position and velocity. Physical coordinates ϕ i and modal coordinates δ jk at end time should be ideally equal to the trajectory endpoint static position and their time derivatives (velocities) should be zero, see (30).
The optimization process minimizes the objective function in (30), where a 1 , . . . , a 4 are variable weights, t END is prescribed movement end time, ϕ iEND and δ jkEND are prescribed movement endpoint coordinates.
The extensive optimization brings three frequency multiplication factors k 1 = 1, k 2 = 0.5 and k 3 = 2.5, with resulting frequency f i = k i f N , the 16 intervals of f N −1 , and amplitudes A i shown in Table 1.

Simulation
The applied control forces the robot endpoint to move along the desired trajectory. The difference between the control methods (computed torques method and invariant control) is in the behaviour of the zero dynamics movements from the end time of motion. The computed torque method cannot effectively cancel out zero dynamics oscillations after reaching the final position. The invariant control implies slightly different claim on the system torques u 1 and u 2 than the computed torque method, but after reaching the final time, the system is still. The influence of invariant control to the desired parameter p behaviour is on Figure 5. The amplitude of the parameter, p, invariant control modification is significantly low in comparison with the desired motion change.  Figures 6 and 7 show the behaviour of u 1 and u 2 input torques, respectively. The u 1 plot of Figure 6 shows the first input torque needed for satisfying the desired motion. There are two curves, one is dedicated for the computed torques method, and the second one corresponds to the torque claim of the invariant control. In the cut is the detailed behaviour after the prescribed motion final time. Invariant control modifies input torque so that there is no residual vibration of zero dynamics, contrary to the computed torque method. The second part of Figure 6 graph ∆u 1 shows the difference between computed torques and invariant control u 1 behaviour. The red curve represents modification of computed torques u 1 , claimed due to the invariant part of the control, and the blue line shows the residual (zero dynamics) vibrations of the system with control using the computed torques method. The corresponding behaviour of u 2 input torque is shown on Figure 7. The advantage of invariant control is that the system moves from one equilibrium to another equilibrium position. The input torque is modified within 5% of the reference torque (computed torque method serves as the reference). The movement within parameter, p, is the only disadvantage of the invariant control, but it is of small amplitude, as shown on Figure 5 (bottom).

Conclusions
The control of a flexible robot as a representative of underactuated system with zero dynamics is performed using invariant control method. The basis of invariant control are harmonic functions, which are used for feedforward control of particular flexible system. The harmonic functions provide smooth motion as is needed for vibration cancellation when reaching the desired position. Presented here is an invariant control of flexible underactuated structure in connection with observing the desired trajectory.
The control strategy uses motion frequencies inspired by so-called natural motion. The residual oscillations provide the natural motion frequency, which is used to cancel out unwanted vibrations. The control input is separated into two parts. The arbitrary part of the control input (w A ) is designed to control the directly actuated part of the dynamic system. Theinvariant part of the control (w I ) is selected to steer the system zero dynamics in the desired way. The invariant part of the control fulfils the invariant conditions with respect to overall control input behaviour. The amplitudes of chosen periodic functions are obtained by optimization process with the final position in objective function. The achieved accuracy depends on the optimization process inputs, the trajectory length, and the number of used frequencies. The control parameters are predicted using the optimization process and resulting tracking accuracy is the same for the same trajectory.
The main aim of this work was to present the functionality of an invariant control approach to a system with flexible elements. Further research will focus on the extension of the invariant control by feedback to avoid the optimization process. The proposed concept will be enhanced by the model predictive, wave-based or sliding mode control to secure missing feedback. To fulfil the invariance conditions (16) the control strategy will be formulated in discrete form.. The presented control can be practically applied in serial robotics, i.e., robotic manipulators or machine tools.