Energy-based swing-up control for a two-link underactuated robot with flexible first joint

This paper concerns the swing-up control of a two-link robot moving in a vertical plane, which has a single actuator at the second joint and a linear torsional spring at the first joint. First, we present a necessary and sufficient condition such that the robot is linearly controllable at the upright equilibrium point (UEP, where two links are both upright). Second, we prove without any assumption that the robot is at an equilibrium point provided that its actuated joint angle is constant under a constant torque. Third, for the robot with its torsional stiffness of the spring being not greater than a value determined by the coefficients of its gravitational terms, we propose an energy-based swing-up controller without singular points. We conduct a global motion analysis for the robot under the proposed controller. For the case that the total mechanical energy of the robot converges to its desired value, we present the phase portrait of the closed-loop solution. For the case that the convergence is not achieved, we show that the closed-loop solution approaches an equilibrium point belonging to a set of equilibrium points, and give a sufficient condition to check its instability. From the motion analysis, we present a sufficient condition such that the robot can be swung-up close to the UEP under the proposed swing-up controller. Finally, we verify our theoretical results through a numerical simulation.


Introduction
An underactuated robot, which has less control inputs than its degrees of freedom (DOF), appears in a broad range of applications in real life because of its low energy consumption and simple structure. Among planar underactuated robots, the two-link robot with a single actuator at the first joint (referred to as the Pendubot [12]) and the two-link robot with a single actuator at the second joint (referred to as the Acrobot [6,11]) are typical examples. For the Pendubot and the Acrobot moving in a vertical plane, many researchers concern a particular control problem called the swing-up control, i.e., driving the robot close to its upright equilibrium point (UEP, where the links are both upright) and stabilizing it at the UEP [4,11,15].
A flexible link presents advantages, for example, in space applications or assembly tasks [3,5]. In [2,7], the authors studied the control of nonlinear oscillations of a flexible link by considering its structural flexibility. Also, numerous researchers are interested in the multilink robot with torsional springs at the joints, since one can use it to model a flexible link [17]. In the monograph [13], the authors investigated several interesting examples of double pendulums with linear torsional springs introduced at the joints ( hinges) (see, pp. 31-32, pp. 69-70, pp. 74-75, pp. 79-80). Many researchers studied two-link robots with torsional springs at the joints for practical or theoretical purposes [1,3,16,18,19].
In this paper, we study an underactuated two-link robot moving in a vertical plane, which has a single actuator at the second joint and a linear torsional spring at the first joint (Fig. 1). In [3,16], authors studied a twolink planar robot, which has a single actuator at the first joint and a linear torsional spring at the second joint. In the absence of gravity, the proportional derivative (PD) control can globally stabilize the robot in [3,16] at any desired equilibrium point [3]. However, in the vertical plane, the PD control can globally stabilize the robot in [3,16] at its UEP, only if the torsional stiffness is larger than a mechanical parameter related to a gravitational term of the robot [16]. Recently, in [1], the PD control in [16] is extended to globally stabilize the robot of Fig. 1 at its UEP, when the torsional stiffness is larger than a value determined by the coefficients of gravitational terms of the robot.
For the case that the torsional stiffness of the spring is not greater than the value mentioned above, since a PD controller can not stabilize it at the UEP, this paper extends the energy-based control for the Acrobot in [15] to the robot of Fig. 1. The basic idea of the energy-based controller is to control the total mechanical energy, the actuated joint angular velocity, and the actuated joint angle of the robot to their desired values, respectively, for indirectly controlling the unactuated joint [4,10,15]. As shown in this paper, we encounter some new difficulties in the global motion analysis.
Firstly, we give a sufficient and necessary condition such that the robot of Fig. 1 is linearly controllable at its UEP; that is, the linearized model of the robot at the UEP is controllable. We find that there exist some special mechanical parameters destroying the linear controllability. It is surprising because two extreme cases of the robot are always linearly controllable at the UEP: the Acrobot ( the robot of Fig. 1 with the torsional stiffness being 0) is linearly controllable at its UEP for any mechanical parameters [14]; if the torsional stiffness is ∞, then link 1 is fixed at the upright position, and the robot is also always linearly controllable at its UEP.
Secondly, we prove an important property of the robot of Fig. 1 that if the angle of its second joint is constant under a constant torque, then the angle of its first joint is also constant; that is, it is at an equilibrium point. This is a main result of this paper, which is useful in the motion analysis. There is a proof of this property in [1]; however, the proof is based on several assumptions about mechanical parameters and the actuated joint of the robot. In this paper, we show that this property holds for any mechanical parameters, arbitrary actuated joint angle and torque.
Thirdly, we depict the motion of the robot of Fig. 1 under the proposed energy-based controller by investigating the convergent value of the total mechanical energy, which is another main contribution of this paper. For the case that the total mechanical energy of the robot does converge to the desired value, we characterize the relationship between its mechanical parameters and the phase portrait of the closed-loop solution. For the case that the convergence is not achieved, we show that the closed-loop solution approaches an equilibrium point belonging to a set of equilibrium points, and we give a simple sufficient condition for checking its instability. Through the motion analysis, we present a sufficient condition such that the robot of Fig. 1 can be swung-up close to the UEP under the proposed energybased controller.
The rest of this paper is organized as follows: In Sect. 2, the motion equation of the robot of Fig. 1 1 is presented. Two important properties are presented in Sect. 3. The controller design and the motion analysis are carried out in Sect. 4. A simulation validation is provided in Sect. 5. Finally, a conclusion is made in Sect. 6.

Motion equation
Consider the two-link robot moving in the vertical plane with only the second joint being actuated, and a linear torsional spring introduced at the first joint ( Fig. 1). For link i (i = 1, 2), m i is its mass, l i is its length, l ci is the distance between joint i and its center of mass (COM), and J i is its moment of inertia with respect to its COM. The motion equation of the system Fig. 1 The underactuated two-link robot has a single actuator (torque τ ) at the second joint and a linear torsional spring (stiffness k 1 > 0) at the first joint. Here, the first joint is the joint fixed at the coordinate origin O, and the second joint is the joint connecting two links is where q = [q 1 , q 2 ] T , and with g being gravity acceleration.
The total mechanical energy of the robot of Fig. 1 is where P(q) is the potential energy and with P G (q) being the gravitational potential energy. Letting P G (q) be zero when the two links of the robot lie on the X-axis yields P G (q) = β 1 cos q 1 + β 2 cos(q 1 + q 2 ).
Recall an important property of the two-link planar robot about the five physical parameters in (2), which will be used in this paper.

Control objective
For mechanical parameters β 1 , β 2 and the torsional stiffness k 1 of robot (1), define γ as For the case γ > 1 (k 1 > β 1 + β 2 ), in [1], a PD controller is designed for globally stabilizing robot (1) at the UEP. This paper studies how to design a controller so that robot (1) with 0 < γ ≤ 1 can be swung up and stabilized at the UEP.

Linear controllability
Take the state variable vector as x = [q 1 , q 2 ,q 1 ,q 2 ] T . When x = 0, robot (1) is at its UEP. The state equation of (1) is given bẏ where Then, the following result can be obtained.

Lemma 2
Consider the torsional stiffness k 1 and physical parameters defined in (2). The linearized model of robot (1) at the UEP is controllable if and only if where Proof Note that k uc > 0 holds due to (8). Linearize system (10) around x = 0 to obtaiṅ where For linear system (13), the determinant of the con- Thus, |U ue | = 0 if and only if (11) holds. This completes the proof of Lemma 2.
We give the following remark about Lemma 2.

Remark 1
The Acrobot (robot (1) with k 1 = 0) is always linearly controllable around x = 0 [14]; when k 1 → ∞, the angle of the first joint is fixed at q 1 = 0 and the system is clearly linearly controllable around x = 0. For robot (1) with 0 < k 1 < ∞, it is interesting to find that some special mechanical parameters destroy the linear controllability.

Constant actuated joint angle under constant torque
In this section, a property of robot (1) about its equilibrium configuration is presented, which is important for the motion analysis later.
Since the fact that neither (28) nor (29) holds raises a contradiction, we obtain that q 1 is constant. This completes the proof of Theorem 1.
We give the following two remarks on Theorem 1 in comparing the corresponding results in [1] and [15].

Remark 2
The content of Theorem 1 in this paper is the same as that of Lemma 1 in [1]; however, the proof in [1] needs an assumption described below. In [1], time derivative of (21) is taken and A 0 cos q 1 − B 0 sin q 1 = 0 is obtained instead of (22). To prove Theorem 1, the assumption of A 0 = 0, B 0 = 0 and A 0 = B 0 is introduced in [1]. In contrast to [1], Theorem 1 holds for any mechanical parameters, angle of the second joint, and constant torque.

Swing-up controller
In this section, for swinging up robot (1), we propose an energy-based controller. In addition, we conduct a global motion analysis for it by studying energy convergence.

Controller design
For E defined in (3), q 2 andq 2 , we study how to design τ such that where E r = β 1 + β 2 is E evaluated at the UEP and it is a constant determined by the mechanical parameters of robot (1). Take Lyapunov function V as where k D > 0 and k P > 0 are constants. Taking the time derivative of V along (1), we havė Now, we give the proof of the propertẏ For the time derivative of P(q) in (4), we havė Then, taking the time derivative of E in (3), we obtaiṅ Eliminating M(q)q in (39) by using (1) yieldṡ For system (1), we haveṀ which is a skew-symmetric matrix. An important property of the matrix is Then, from (42) and (40), we obtain (37). Substituting (37) into (36) yieldṡ If there exists τ satisfying where k V > 0 is a constant, theṅ From (1), we obtain Substituting (46) into (44) yields where If then, from (47), we obtain A lemma about robot (1) under controller (50) is presented here.

Motion analysis
Now, we conduct the global motion analysis for robot (1) under controller (50).
Therefore, the equilibrium configuration the system must satisfy (6), (7) and (55). We present the following theorem.

Theorem 2 Consider robot (1) under controller (50)
with k P > 0, k V > 0 and k D satisfying (51). As t → ∞, all solutions of the closed-loop system approach where W r is for V * = 0, which is defined as and Ω is for V * = 0, which is defined as Ω = q e , 0 | q e satisfies (6), (7), (55), and P q e = E r .
According to Theorem 2, we analyze W r for V * = 0 and Ω for V * = 0 below.

The phase portrait of W r
In this section, we give an analysis of the phase portrait of W r defined in (57), which helps us to determine whether robot (1) under controller (50) approaches the UEP when V * = 0. Since we have q 2 ≡ 0 in W r , we only need to analyze the phase portrait of (q 1 ,q 1 ) in W r .
Rewrite the equation with respect to (q 1 ,q 1 ) in W r as where is periodic with period 2π and with γ defined in (9).
Since the left side of (60) is non-negative, the solutions of (60) only exist in Then, we give the following theorem. Consider We have the following statements for the nonzero solutions of (66).
According to Theorem 3, the relationship between the value of γ and the phase portrait of (q 1 ,q 1 ) in W r is illustrated as below.
where we define φ 0 = 0 for achieving a unified expression. In this case, besides the two loops connected at (q 1 ,q 1 ) = (0, 0), there exist 2(i − 1) Fig. 3 When γ 1 < γ < γ 0 , a q 1 = φ 1 is the only positive solution of (66), b the phase portrait of (q 1 ,q 1 ) in W r isolated loops in the phase portrait of (q 1 ,q 1 ) in W r (see Fig. 4). The closed-loop solutions starting from some neighborhoods of these isolated loops cannot approach the UEP.
In this case, besides the two loops connected at (q 1 ,q 1 ) = (0, 0), there exist 2(i −1) isolated loops and two isolated equilibrium points in the phase portrait of (q 1 ,q 1 ) in W r . The closed-loop solutions starting from some neighborhoods of these isolated loops and equilibrium points cannot approach the UEP.

The stability of the equilibrium points in Ω
If an equilibrium point in Ω defined as (58) is unstable, then the robot cannot be maintained at that point in practice due to some disturbances. Thus, we give a sufficient condition for checking the instability of the equilibrium points in Ω.
To illustrate under what conditions robot (1) can be driven close to the UEP by controller (50), we give the following theorem to summarize the results of the motion analysis.

Stabilizing control
For robot (1) under controller (50) with positive k V , k P , k D , define J uep as the Jacobian matrix evaluated around the UEP. Computing the characteristic equation of J uep yields If k 1 < β 1 + β 2 (γ < 1), robot (1) is unstable at its UEP, since one eigenvalue lies in the open right halfplane.
For robot (1) being linearly controllable at its UEP, when it is driven into a small neighborhood of the UEP, we need to switch swing-up controller (50) to a linear state feedback controller to locally stabilize it: where F can be obtained by using pole placement method or linear quadratic regulator (LQR) [8].
In this paper, the small neighborhood of the UEP is defined as where w i > 0, and ε is a small positive constant.
Consider the initial state x 0 = [−π, 1, 0, 0] T . In the swing-up phase, we depict the simulation results in Figs. 6 and 7. From Fig. 6, we observe that V decreases to 0 and E − E r approaches 0; also, we know that the robot approaches W r , the phase portrait of (q 1 ,q 1 ) in Fig. 6 Time responses of V and E − E r , and the phase portrait of (q 1 ,q 1 ) under controller (50) which is depicted as Fig. 3b with φ 1 = 2.367. From  Fig. 7, we know that the first link can be driven to the upright position, and q 2 converges to 0.
When the robot approaches the small neighborhood of the UEP defined as (85) with w 1 = w 2 = 1, w 3 = w 4 = 0.1 and ε = 0.4, stabilizing controller (84) is used to balance it. Take which is computed by using the MATLAB function "lqr" with Q = I 4 and R = 1, where I 4 denotes an identity matrix of size 4. Figure 8 shows that the switch is taken about t = 6.4 s and the switching control strategy can successfully swing up the robot and stabilize it at the UEP. In order to show the motion of robot (1) under controllers (50) and (84) more clearly, we draw the motion sketch of the robot in the swing-up and stabilizing phases (Fig. 9).

Conclusion
This paper studied the swing-up control problem for a two-link robot moving in a vertical plane, which has a single actuator at the second joint and a linear torsional spring at the first joint. Firstly, for the robot around the UEP, we analyzed its linear controllability. Secondly, we proved an important property of the robot that if its actuated joint angle is constant under a constant torque, then it is at an equilibrium point. Thirdly, for the robot with the torsional stiffness k 1 of the spring being not greater than β 1 + β 2 related to the gravitational terms of the robot, since the PD control fails to stabilize it at the UEP, we proposed an energy-based swing-up controller. We provided a necessary and sufficient condition on the control parameter for avoiding any singular point in the controller. We analyzed the motion of the robot under the energy-based controller by studying the convergence of the total mechanical energy. When the total mechanical energy converges to the desired value, we characterized the phase portrait of the closed-loop solution in terms of the ratio of k 1 and β 1 + β 2 . When the convergence is not achieved, we showed that the  (50) and (84) closed-loop solution approaches an equilibrium point belonging to a set of equilibrium points, and we gave a sufficient condition for checking its instability. From the motion analysis, we presented a sufficient condition such that the robot approaches the UEP. Finally, we gave simulation results to show the effectiveness of the proposed controller. In this paper, we not only unified some results about the Acrobot, but also presented some analysis methods, which are expected to be useful in studying other underactuated robots with torsional springs introduced at the joints.

Appendix A: Proof of Lemma 3
Proof Notice that (49) holds if and only if where M p (q 2 ) is defined in (52). Since M p (q 2 ) > 0