Evaluation of Linearization Methods for Control of the Pendubot

: The aim of this paper is to test the usefulness of a new approach based on partial feedback linearization to control the Pendubot. The control problem stated in the article is to stabilize the Pendubot in the upright position. In particular, properties of the closed-loop system and the zero dynamics are investigated and illustrated by results of simulations. Next, the performance of a hybrid-like controller in the case of input saturation is evaluated by conduction extensive simulation trails. The experimental results suggest that the considered control methodology can be successfully applied for a real system.


Introduction
Acrobot and Pendubot are well-known fundamental examples of under-actuated mechanical systems moving in the presence of gravity. Although their kinematic structures are relatively simple, still they can be considered as important benchmark systems which are of great importance for the development of nonlinear control strategies.
Basically, a standard approach to stabilize both systems at an unstable equilibrium requires design of two controllers for the task of swing-up (when the robot hangs down or is far from equilibrium pose) and the balancing task around the equilibrium point, respectively [1]. In particular, the swing-up problem can be viewed as a challenging problem in non-linear control. Many solutions to it are based on partial feedback linearization, starting from fundamental works of Spong and Block [2][3][4][5]. Other approaches take advantage of an energy based control and the passivity properties of the system [1,6], or a fuzzy logic control [7]. Among others a model orbit stabilization [8], or virtual holonomic constrains are proposed to swing up the Pendubot as well. Recently, an extended state observer based active disturbance rejection control scheme was applied to the Pendubot system for a trajectory tracking tasks in the presence of uncertain dynamics [9]. On the other hand, the stabilization task near the equilibrium pose are mainly supported by linear controllers including LQR-based feedbacks [5,10,11].
The considered topics also cover essential aspects related to under-actuated robots, which are constantly being developed, bringing new values or detailing the problem of control of such systems [12][13][14].
Recently, in [15] a new insight to control of under-actuated systems is proposed. The presented approach is based on finding the largest feedback linearizable subsystem for mechanical systems that are not fully feedback linearizable. Although in the mentioned paper the selection of a partially linearizing output that renders the zero dynamics asymptotically stable is thoroughly supported by mathematical formulas developed for double inverted pendulum with one actuator (Acrobot and Pendubot), no attempt is done to apply the discussed concept for a constructive design of a controller for these benchmark systems. Consequently, any simulation or experimental verification has not been reported yet. In this paper, however, authors attempt to fill this gap and extend preliminary results discussed in [16] for the Pendubot. Authors are also interested in a possible application of such an algorithm for the physically existing robot.
An important issue of the linearization approach using state and feedback transformations discussed in [15] is the existence of singular points. Due to this obstruction, a feasible state space is constrained and a feedback cannot be designed in a global way. In the case of Pendubot, a severe linearization constraint comes from the requirement that the system should be in a moving phase. Thus, it is impossible to use this approach directly to stabilize the Pendubot at an equilibrium. In this paper, in order to overcome these limitations we propose a hybrid controller which is supported by a simple linear feedback. Then we consider the performance of closed-loop system based on numerical analysis. In particular, we search for admissible states of the Pendubot for which the hybrid algorithm ensures the convergence to the equilibrium point and makes this point asymptotically stable.
The paper is organized as follows. Section 2 describes the mathematical model for the Pendubot system, together with constrains imposed on the model. In Section 3, the analyzed control algorithms along with the state transformation for the stabilization task is introduced. Section 4 describes the simulation results together with experimental validation of analysed algorithms, while the Section 5 gives final remarks.

Model
The Pendubot is a connection of N = 2 rigid bodies coupled in a tree structure, supported on ground via an actuated frictionless revolute joint. Both links have non-zero mass and the revolute joint connecting them is unactuated. As a result, the system has one degree of under-actuation (2 DOF with 1 independent actuator).
In Figure 1, a standard pendulum structure is depicted. The reference frame is attached at the pivot point, and coordinates are indicated as θ = [θ 1 θ 2 ] ∈ S 1 × S 1 . In order to establish system dynamics one can define Lagrangian L = K − V, while K = 1 2θ T D(θ)θ denotes the kinetic energy, with D being a positive definite inertia matrix, and V is the potential energy. Next, taking into account the actuation on the system one obtains with τ ∈ R. The mathematical model of the system dynamics thus takes the following standard form where corresponding entries of D(θ) ∈ R 2×2 satisfy G(θ) = g a 5 cos(θ 1 + θ 2 ) + a 4 cos θ 1 a 5 cos( .81 m s 2 and τ ∈ R is the control input.

Control Problem
The aim of the work is to examine the usability of a new hybrid controller to stabilize the Pendubot around its top unstable position, taking into account the limitations and constraints resulting from physical and technical properties of a real robot. The investigated controller can be represented by u = u nonlin for swing-up-like motion, where u nonlin and u lin stand for two various feedbacks. The first one denoted by u nonlin is based on the formalism presented in [15]. Its task is to bring the system state near the equilibrium point. Thus, it acts similarly to other swing-up controllers investigated in [2,5,17]. The aforementioned swing-up like motion produced by the closed-loop system is depicted in Figure 2, for an exemplary trial where no input saturation is imposed. One can observe that the robot tends to the equilibrium pose, but cannot achieve it due to the fundamental limitations, described more carefully in Section 3.1.2. To overcome these constraints the second feedback, denoted by u lin , is applied when the system state is in a prescribed set containing the equilibrium-cf. Section 3.2. This linear feedback is designed to keep the system at the equilibrium pose.

Control Algorithm Based on Partial Linearization
The application of method discussed in [15] to control the Pendubot can be briefly characterized as follows. At first, rewrite Equation (2) in the following form: where (4) and (5), respectively, and apply the feedback transformation according to [3]. The overall robot dynamics model after this transformation can be represented by where: After introducing the following new state variables where I 2 (θ 2 ) = θ 2 0 J −1 2 (s)ds, and transforming (8) into normal form, one obtains equivalent dynamics defined byq where α(θ 2 ) = a 3 sin θ 2 a 2 , β(θ 2 ) = − a 3 sin θ 2 2a 2 , γ(θ 2 ) = a 2 3 sin θ 2 cos θ 2 a 2 (a 2 +a 3 cos θ 2 ) , η(θ 1 , θ 2 ) = a 5 cos(θ 1 +θ 2 ) a 2 +a 3 cos θ 2 . Correspondingly, Equation (10) can be written as followṡ Now, in order to find a control u we look for such an output function h that maximally linearizes dynamics (10). According to [15] it is possible to select function h(x) for which system (10) has relative degree equal three for x ∈ X , where defines a set of regular points where the linearization is possible (In the paper we take advantage of the notation L X Y, commonly used in non-linear control theory, to express Lie derivatives). Equivalently, it can be stated that for any x ∈ X the system (11) is part-linearizable with the following 3-dimensional linear controllable subsysteṁ with being a new set of states and ν := L f h + L g L 2 f h(x)u being a new input. Recalling the proposition of function h considered in [15] we slightly modify it by subtracting a constant offset as follows where q r1 ∈ S 1 denotes the desired coordinate. Then computing one can conclude that the set (13) in the considered case is represented by Remark 1. From (18) it follows that any equilibrium point of (11) is not a regular point since zero It is also noteworthy that the expression (17) obtained for the selected function h can be conveniently represented as follows where κ 1 := 2a 3 sin θ 2 (v 2 a 3 cos θ 2 − v 1 (a 2 + a 3 cos θ 2 )) and κ 2 := a 2 2 (a 2 + a 3 cos θ 2 ). As a result, the set of regular point X can be alternatively specified for κ 1 = 0.
Assuming that x ∈ X , one can still use the following feedback u = u nonlin , where to obtain linear system (14). As a result, applying the following feedback where ω 0 > 0 is a gain scaling factor, one can expect that trajectory x(t) converges to a vicinity of the point determined by z = 0.

Zero Dynamics
Here we move on to the analysis of the zero dynamics of the system assuming that z → 0. From (16) one has q 1 → q r1 . Next, recalling that L f h =ḣ → 0 and L 2 f h =ḧ → 0 one can conclude that v 1 → 0 andv 1 → 0, respectively. Under these conditions one obtains the following first order zero dynamicṡ where θ 2 denotes the solution of the first equation in (9) for q 1 ≡ q r1 . Since Equation (22) cannot be solved analytically, one can use numerical methods to analyze trajectories of the system on the zero dynamics. Such example results are illustrated in Figure 3, taking into account positive and negative velocityq 2 = v 2 . In both cases, one can observe that the trajectory θ 1 (t) goes through the required point determined by θ 1 (t) = θ r1 . Although this a desirable effect, the system cannot be stabilized at this point. It corresponds to the regularity condition since at the equilibrium velocity v 2 = 0 and the zero dynamics cannot be longer maintained.

Avoiding of Singular Points
One of the limitations of analyzed method from Section 3.1 is a fact that the singular points occur, i.e., when κ 1 in (19) goes to zero, the u nonlin in (20) becomes unbounded. Hence, implementing the feedback (20) the inversion of term L g L 2 f h has to be computed. Since the inversion can be made trivially only for x ∈ X one can use the following robust inversion schemes while > 0 is a design parameter. For illustration of this issue Figure 4 depicts a plot of (19) during one exemplary simulation trial. It can be easily noticed that (19) changes its sign many times in the given time horizon. Based on simulation results it was observed that application of this robust inversion makes it possible to enlarge the region of attraction of the analyzed algorithm and improves its performance. However, it violates locally the linearization procedure proposed by [15].

Linear Controller
Since the control approach discussed in Section 3.1 does not guarantee stabilization of the closed-loop system at the chosen equilibrium the overall control strategy based on a hybrid approach (6) will be used. For this purpose, firstly a set of feasible initial conditions for which the controller (20) applied for system (11) brings the robot state near the equilibrium point should be obtained.
Secondly, recalling that the linear approximation of dynamics (11) established at the equilibrium point provides a controllable linear system [18], it is possible to locally stabilize (11) at this point using the following linear feedback where x r = [q r1 0 q r2 0] and K = [k 1 k 2 k 3 k 4 ] stand for the reference state and the controller gains, respectively. The selection of gains K should be made appropriately and can refer to pole-placement strategy, LQR approach, and others.

Simulation and Experimental Results
This section provides simulation results of implementing control method (6) to the system in a form of (11), and moreover some preliminary experimental results. The aim of presented simulations is to check the performance of the controller applied for the stabilization of Pendubot in the upright equilibrium pose. Another purpose is to verify the convergence area for the closed-loop system, which means that the set of initial conditions are going to be checked to see whether they are appropriate to stabilize the robot under certain boundary conditions. This means that one wants to see how far the Pendubot can be moved away from the equilibrium pose, to be stabilized. In simulations it was assumed that the desired stabilization pose was the upright position for which the angles θ 1r and θ 2r were equal π 2 and 0, respectively.

Characteristics of the Laboratory Pendubot-Like System
In simulations the robot parameters (Table 1) was selected in order to adapt them to the physically existing mechanism, i.e., to the double inverted pendulum presented in Figure 5. The considered robot is a modified construction of Quanser's-rotary double inverted pendulum [19] (Figure 5a). The analyzed experimental system consists of the main unit (Quanser's rotary servo base unit), including the DC motor, planetary gearbox, potentiometer, encoder, tachometer, and double pendulum module. With respect to the original rotary double inverted pendulum system, the analyzed plant has been devoid of the "first" rotary arm, so that the drive shaft is directly connected to the shorter arm of the double pendulum. As a result, we obtain an implementation of a Pendubot robot-a double pendulum with a motor attached to the first rotary joint (Figure 5b).

Simulation Procedure
In the research considered in this paper in order to establish u lin gains the following cost function J, dependent on state and control signal, is defined where Q and R are the weight matrices for states and inputs, respectively. The optimal K-gains ( In the conducted simulations we compare different approaches for the swing-up motion. The purpose of this comparison is to check properties of the control scheme investigated in Section 3.1 with other well known algorithms based on collocated and non-collocated linearization [3]. To facilitate the description, we use the following nomenclature: • Algorithm 1-u nonlin is defined using the collocated linearization; • Algorithm 2-u nonlin is defined using the non-collocated linerization; • Algorithm 3-u nonlin is defined based on the maximum partial linearization approach described in this paper.
It is essential to emphasize that the controllers were verified in the presence of the input saturation. Namely, it was assumed that the maximal motor input voltage is equal to 10 V. Thus, each algorithm was checked whether it would be capable of controlling the robot presented in Section 4.1.
To determine the convergence area of each analyzed method, a series of tests were conducted. As some properties cannot be deduced analytically, one can use some other techniques, such as those based on sampling-based methods.
It was assumed that the set of initial configuration conditions are defined in a discrete domain and specified by a 2D grid. The ranges of θ 1 and θ 2 are selected from −180 to 180 degrees and from −105 to 105 degrees (the second range results from physical constrains, as the second joint cannot be deflected more than ±105 degrees), respectively. The spacial resolution of the grid is set to ∆θ = 2 • (the resolution is chosen based on preliminary simulation studies in order to achieve a compromise between the required accuracy and the duration of simulation experiments). Each cell of the grid corresponds to the initial condition (θ 1 0 , θ 2 0 ) applied for each simulation trial. The trial was being taken as successful while the root of the sum of both angle errors (error between actual and desired angle) was smaller than 0.05 within simulation time t = 15 s or less.
In order to obtain objective comparative data the following two criteria are taken into account: the integral of square of error in transient state and the integral of square of control signal (computed based on motor input voltage over time), which can be considered as an indicator of the energy used by the algorithm [20].
In addition, parameters of the controllers were optimized. For each pair of initial condition defined by the grid 100 iterations were performed with randomly chosen values of gains. To be more detailed, proportional, and derivative coefficients were considered for Algorithms 1 and 2, while positive parameter ω 0 was adjusted for Algorithm 3, see (21). By this, one can look for a near-optimal choice of regulator gains, which provides the best performance for the given initial condition. Taking into account all cells of the grid almost 2 million simulation trials were conducted with respect to each algorithm.
The performed simulations allows one to find a region of initial (starting) positions (Figures 6a-8a) that leads to a stable upright position. In these figures, the blue cells indicate the successful trials, while the blank cells indicate the initial conditions that leads to failure (robot collapses). Red cells mean the case when only linear feedback acts, i.e., when the robot is in the vicinity of equilibrium pose and a switching to partial linearizing controller does not take place (authors assume that it happens in some arbitrary chosen error tunnel), or there is no possibility to partially linearize considered system, as the singular point occurs. The performance factors were recorded for all successive trails and the smallest value of energy criterion V (total energy consumption over trial) and the smallest value of E p for each initial condition were computed based on 100 trials. The obtained results are depicted in Figures 6b-8b and Figures 6c-8c. From the criterion (27) one can try to evaluate how the real robot is going to be driven without taking the control effort into considerations. For example, it gives some insight if swing-up motions going to be wide, extensive and long lasting (high criterion value), or the motion is going to be "fast and short", causing a rapid approach to desired pose (small criterion value). On the basis of the obtained results, one is able to determine which region of conditions is more or less demanding in terms of energy, which is useful in practical implementation on the test-bed.  Comparing the convergence areas, it can be found that for the considered system subject to a limited control input the Algorithm 3 makes it possible to extend the set of feasible conditions, however, the energy factor is increased in comparison to other tested controllers.
As a summary of simulation trails one can also consider Table 2 where mean and standard deviation of values (27) and (28) obtained for the considered methods are compared. The distributions of V and E p for the discussed algorithms are depicted in Figures 9-11.

Experimental Results
In order to consider properties of Algorithm 3 in more real-life scenarios, experimental work using the setup described in Section 4.1 was conducted. To see how the algorithm drives the robot to the reference upright position one of the successful trails marked in Figure 8a was chosen. The exemplary initial condition was selected as θ 1 0 = 168 • and θ 2 0 = −100 • . The results of the experiment is compared with those obtained in simulations in Figures 12 and 13. Taking into account the recorder angular trajectories and the voltage input signals one can state that the numerical simulations and experiments present a similar response of the closed-loop system. In particular, it can be observed that the swing-up controller is enabled only in an initial control period while the stabilization at the desired point is ensured by the LQR feedback.

Conclusions
The main objective of this paper is to evaluate properties of the new control approach designed for the Pendubot. The conducted research based on simulations and experiments complements theoretical works obtained in [15] and gives an insight of their application in robotics. The results reported in this paper allows one to state that the concept of the maximal feedback linearization can be successfully employed for the design of a hybrid controller which makes it possible to support the stabilization of the system at the equilibrium. One can also conclude that the application of this linearization technique with respect to the Pendubot is challenging due to the presence of singular points as well as the input saturation. Hence, the underlying controller based on the maximal partial linearization approach cannot be seen as an overall recipe for stabilizing a double inverted pendulum with one actuation. Basically, the algorithm does not guarantee that trajectories of the closed-loop system do not reach singularities. In this paper, however, switching techniques are used to cope with these difficulties. Alternatively, one could employ tracking of feasible reference trajectories avoiding the singular points. This concept will be explored in future works.