# Introduction he study of humanoid robot is currently one of the most exciting research projects. Even if some of those works have already demonstrated very reliable dynamic biped walking (Yamaguchi, Soga, Inoue & Takanishi, 1999; Hirai, Hirose, Haikawa & Takenaka, 1998; Nishiwaki, Sugihara, Kagami, Kanehiro, Inaba & Inoue, 2000), we believe it is still important to understand the mathematical theoretical background of biped locomotion. In standing, it has become common to consider the body as an (single\double\triple) inverted pendulum pivoted at the ankles. Moreover, up ride of a human shoulder is also considered as a motion of an (single\double\ triple) inverted pendulum (Jadlovská, 2011;Jadlovská & Jadlovská, 2010). An inverted pendulum system is a typically nonlinear, redundancy, uncertainty, strong coupling and natural characteristics of instabilities. All these features make it the ideal model of advanced control theory and typical experiment platform of test control results. There are a number of different kinds of the inverted pendulum systems presenting a variety of control challenges. The most common types are the single inverted pendulum on a cart (Ohsumi & Izumikawa, 1995;Åström & Furuta, 2000). the double inverted pendulum on a cart (Zhong & Rock, 2001), the double inverted pendulum with an actuator at the first joint only (Pendubot) (Graichen & Zeitz, 2005), the double inverted pendulum with an actuator at the second joint only (Acrobot) (Hauser & Murray, 1990), the light weight rotary pendulum (Brockett & Hongyi, 2003). In this paper, we have addressed the problem of stability of double inverted pendulum in the upright position using the pole placement method. For this, we have assumed that the double inverted pendulum is pivoted at the lower end of inner arm (see figure 1). The first step to achieve the objective is to understand the dynamics of the system of double inverted pendulum by developing the mathematical modelling of the system. In modelling, we have used Euler-Lagrange formulation to find equation of motion. In the second step, we linearized this non-linear system of double inverted pendulum in the up-up position and builded up its linear state space model. The linearization is one of the most important issues for control of non-linear systems. There are lots of studies in the literature regarding linearization (Jordan, 2006;Wang, Chen & Zhou, 2000;Conga, Wanga & Hill, 2005). In the next step, the stability and controllability criteria showed that the system is unstable but it is controllable. To control this unstable system, we have employed the pole placement method. In this method, the poles are the eigen-values of linear state space model and the calculated gain matrix places the poles at desired position to stabilize a system. In the simulation part of this paper, numerical and graphical simulations for control task are given to show the effectiveness of the proposed pole placement scheme. # II. # Mathematical Modeling of Dip In this section, we will describe mathematical model necessary for stability and controllability analysis. The mechanism of the double inverted pendulum is shown in Figure 1 schematically. The mathematical model of DIP can be derived using the Euler-Lagrange equation. The form of the Euler-Lagrangian equation used here is: d L L dt ? ? ? ? ? ? = ? ? ? (1) Where L = T -V is a Lagrangian, T is kinetic energy, V is potential energy, ? = [? 1 ? 2 ] T is Figure 1 : the input generalized force vector produced by two actuators at the lower joint (ankle) and second at joint between to arm (knee), The kinetic and potential energies in terms of generalized coordinates can be determined as: ( ) ( ) ? ? ? ? ? + = + + + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?(2) ( ) 1 1 1 2 1 1 2 cos 2 cos cos m gl V m g l l ? ? ? = + ? ? ? ? ? ?(3) Differentiating the Lagrangian L = T -V by generalized coordinate's vector yields Euler-Lagrange equation (1) as: ( ) ( ) 2 2 2 2 2 4 4 cos 2 cos 2 sin 4 sin 11 1 2 1 2 1 2 2 2 2 1 2 1 2 2 2 2 2 2 1 2 2 2 2 1 2 2 1 2 2 sin sin 1 2 1 1 2 2 1 2 1 ? ? ? ? ? ? ? ? ? ? ? + + + + ? + + ? ? ? ? ? ? ? ? ? ? + ? ? = ?? ?? ? ? ? ( ) 2 2 2 2 cos 2 sin sin 2 1 2 2 2 2 1 2 2 2 2 2 1 2 2 1 2 2 1 2 2 m l l ? ? ? ? ? ? ? ? ? ? ? ? + + + + ? = ? ? ? ? ? ? ? ? ?? ?? ? The matrix form of the system is ( ) 2 2 2 2 2 4 4 cos 2 cos 0 2 sin 11 1 2 1 2 1 2 2 2 2 2 1 2 2 2 2 2 1 2 2 1 1 2 2 2 sin 0 2 2 cos 2 1 2 2 2 2 1 2 2 2 2 2 2 2 2 4 sin 2 sin 2 1 2 2 1 2 1 2 1 1 2 2 ? ? ? ? ? ? ? ? ? + + + + ? ? ? ? ? ? ? ? ? ? ? ? ? ? + ? ? ? ? ? ? ? ? ? ? + ? ? ? ? ? ? ? ? ? ? ? ? ? ? + ? + ? ?? ?? ? ? ? ( ) ( ) sin 1 2 1 sin 2 2 2 1 2 m gl ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? = ? ? ? ? ? ? ? ? ? ? ? a) Linearisation of the System The tracking controller of DIP is designed using the Gain Scheduling method based on the linearisation of the system equations around certain equilibrium points. In this paper, we linearize the system at the vertical unstable equilibrium by taking. ( ) ( ) 0, 1 2 cos cos 1 1 2 sin ; sin ; 1 1 2 2 0; cos 1; sin 1 2 1 2 1 2 1 2 2 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? m 1 g m 2 g ? 2 ?1 ( ) A Year So, ( ) ( ) ( ) 2 2 2 2 4 4 2 11 1 2 1 2 1 2 2 2 1 2 1 2 2 2 2 2 1 2 1 1 2 2 1 2 1 2 2 2 2 1 2 2 2 1 2 2 2 2 2 2 1 2 2 m l I m l m l l m l m l l m l m m gl m gl ? ? ? ? ? ? ? ? ? + + + + + ? ? ? ? ? ? ? ? ? ? ? + ? ? = ? ? ? ? ? ? + + + ? = ? ? ? ? ? ? ? ? ?? ?? ?? ?? The matrix of the linear system ( ) 2 2 2 2 4 4 2 11 1 2 1 2 1 2 2 2 2 1 2 2 2 1 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1 1 2 1 2 2 2 2 ? ? ? ? ? ? + + + + ? ? ? ? ? ? ? ? ? ? ? ? ? ? + ? ? ? ? ? ? ? ? ? ? ? ? ? + ? ? ? ? ? ? ? + = ? ? ? ? ? ? ? ? ? ? ? ? ? ?? ?? where ( ) 1 0 0 0 0 1 0 0 2 2 4 1 1 1 2 1 2 0 0 2 2 1 2 2 2 2 4 2 1 2 2 2 2 2 0 0 2 2 1 2 2 2 2 2 2 0 0 1 0 0 0 0 1 2 0 0 1 2 1 2 2 2 2 0 0 2 2 2 2 m l I m l M m l l m l m l l m l m l l m l m l I N m m gl m gl m gl m gl m gl ? ? ? ? ? ? ? ? + + ? ? = ? ? ? ? + + ? ? ? ? ? ? ? ? + ? ? ? ? ? ? ? ? = ? ? + + ? ? ? ? ? ? ? ? ? ? 0 0 0 1 0 0 1 T = ? ? ? ? ? ? ? ? ? ? ? ? ; ? ? ? = ? ? ? ? ? ? ? ? ? ? ? ? ? ?.A = ? ? ? ? ? ? ? ? ? ? ? ? 0 0 0 0 B = -0.0328 -0.0908 -0.0908 -0.1775 ? ? ? ? ? ? ? ? ? ? ? ? . III. # Stability and Controllability of System # Stability Criterion A system (state space representation) is stable iff all the eigenvalues of the matrix A are inside the unit circle. The eigen value of A of our system are: 0.0000 + 1.9939i, 0.0000 -1.9939i,-1.0115, 1.0115 which are outside the unit circle because the modules of eigen values are greater than 1. So the system is unstable in absence of input force (? 1 = 0, ? 2 0). # b) Controllability criterion A system (state space representation) is controllable iff the controllable matrix C = [B AB A 2 B ?. A n-1 B] has rank n where n is the number of degrees of freedom of the system. In our system, the controllable matrix C = [B AB A 2 B A 3 B] has rank 4 which the degree of freedom of the system. So, the system is controllable. If the system is controllable, then all set of distinct closed loop poles are assigned arbitrarily by output feedback gain (Kimura, 1975;Kimura, 1977;Wonham, 1967). # b) State space model for the above linear system The state space model equation for the system is x Ax Bu y Cx Du = + = + ? (4) 1 2 11 4 4 4 4 A M N B M T C I D u ? ? ?? ?? ? ? ? ? ? ?? ?? ?? IV. # Pole Placement Block diagram of pole placement is given in Fig. 2. If the linearized system considered is completely state controllable, then poles of the closed-loop system may be placed at any desired locations by means of state feedback through an appropriate state feedback gain matrix K. In this paper, we have used the following method to calculate state feedback gain matrix: Pole placement with output feedback is displayed in Figure 2. In this paper, the reference signal, r, is taken zero. If an output feedback control u = ?Kx is applied to (4), the closed-loop system becomes ( ) x A KB x = ? ? The poles assigned with output feedback are ? = {? 1 , ? 2 , ? 3 ,?, ? n }. The problem considered in this paper is finding gain matrix K for transferring the poles. # a) Gain Matrix Scheduling Consider the controllability matrix C = [B AB A 2 B ?. A n-1 B] which is an n×pn order matrix. If the system is controllable, then the rank(C) = n. That means, it has only n linearly independent columns among the pn columns. Therefore, there will be many ways to construct an n×n similarity matrix which will give a multi-input controllable canonical form. In this paper, we use the following way: Consider controllable matrix in n block as follows: 1 1 1 1 1 0 1 1 n n p p p C b b Ab Ab A b A b Block Block Block n ? ? = ? ? ? ? ? ? ? ? ??? ? Starting from the left in, this matrix, check each column, keeping count of the number of linearly independent columns we encounter. We may stop counting when n linearly independent columns are obtained. Let the block in which we find the last (i.e., the nth) linearly independent column be denoted by the (µ-1) th block. Then the first block in which there are no more independent columns will be the µ th block. This µ is controllability index. ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? = ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Using this inverse matrix of M, calculate transformation matrix T as follows: 1 1 1 1 1 1 2 2 1 2 2 2 1 m m A m T m A m p p p m A p p µ µ µ µ µ µ µ µ µ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? = ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Using transfer matrix T, transferring of the matrix A and B are, 0 A BK µ µ ? ? ? ? ? ? ? ? = ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 1 2 3 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 p µ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? or 0 1 2 1 0 1 0 0 0 0 1 0 0 0 0 1 n A BK ? ? ? ? ? = ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Solving above matrix equation we will get gain matrix K. # b) Calculation of gain matrix Applying above method, for the desired pole 0.1, ?0.1, 0.1i, ?0.1i, the gain matrix is 93.8377 24.8771 0 0 24.1188 24.3614 0 0 K ? = ? ? ? ? ? ? ? V. # Simulation In absence of the input forces, the angles and their velocities increase rapidly which make the system unstable (see figure 3). By giving input force with measurement of gain matrix, the angles and their velocities will be slow down which make the system stable at the desired equilibrium place (see figurer 4) . # Global # Conclusion This study aims to understand what causes humanoids to fall, and what can be done to avoid it. Disturbances and modelling error are possible contributors to falling. For small disturbances in the walk of humanoid robot, it is simply behaving like a double inverted pendulum. So the results of this paper will be used in the development of the humanoid robot. ![? 1 and ? 2 are angular positions of first arm, and second arm of the double pendulum.](image-2.png "") ![Values of Parameters The values of parameters for the given double inverted pendulum are assumed as follows: m 1 = mass of inner arm = 0.4 kg m 2 = mass of outer arm = 0.5 kg l 1 = length of inner arm = 5 m l 2 = length of outer arm = 5 m g = gravitational acceleration = 9.8 m/s 2 So the corresponding values of state space matrices are as follows:](image-3.png "c)") 2![Figure 2 :](image-4.png "Figure 2 :") © 2013 Global Journals Inc. (US) Double Inverted Pendulum © 2013 Global Journals Inc. (US) Block Diagram of Pole Placement © 2013 Global Journals Inc. (US) © 2013 Global Journals Inc. (US) * Swinging up a pendulum by energy control KÅström KFuruta Automatica 36 295 2000 * A Light Weight Rotary Double Pendulum: Maximizing the Domain of Attraction RWBrockett HongyiLi Proceedings of the 42nd IEEE Conference on Decision and Control the 42nd IEEE Conference on Decision and ControlMaui, Hawaii USA 2003 * KHirai MHirose YHaikawa TTakenaka System * Transient stability and voltage regulation enhancement via coordinated control of generator excitation and SVC, Electrical Power and Energy Systems LConga YWanga DJHill 2005 27 * Non-linear feed forward and feedback tracking control with input constraints solving the pendubot swing-up problem KGraichen MZeitz Preprints of 16th IFAC world congress Prague, CZ 2005 * Non-linear controllers for non-integrable systems: The acrobat example JHauser RMurray Proc. of the 1998 ICRA of the 1998 ICRA American Control Conference 1990. 1998 The Development of Honda Humanoid Robot * Modeling and Optimal Control of Inverted Pendul Systems SJadlovská Diploma (Master) 2011 * Thesis. Supervisor: prof. Ing. Ján Sarnovský, CSc * Inverted Pendula Simulation and Modeling -a Generalized Approach SJadlovská AJadlovská Proceedings of the 9 th International Scientific -Technical Conference on Process Control the 9 th International Scientific -Technical Conference on Process ControlCzech Republic 2010. June 7-10 University of Pardubice * Linearization of non-linear state equation AJJordan Bulletin of The Polish Academy of Sciences Technical Science 54 2006 * Pole Assignment by Gain Output Feedback HKimura IEEE Transactions on Automatic Control 1975 * A Further Result on the Problem of Pole Assignment by Output Feedback HKimura IEEE Transactions on Automatic Control 1977 * Design and Development of Research Platform for Perception-Action Integration in Humanoid Robot: H6 KNishiwaki TSugihara SKagami FKanehiro MInaba HInoue Proc. Int. Conference on Intelligent Robots and Systems Int. Conference on Intelligent Robots and Systems 2000 * Non-linear control of swing-up and stabilization of an invertedpendulum AOhsumi TIzumikawa Proceedings of the 34th IEEE Conference on Decision and Control the 34th IEEE Conference on Decision and Control 1995 4 * The control of underactuated mechanical systems MSpong Proceedings of the First international conference on mechatronics the First international conference on mechatronics 1996 * A non-linear controller design for SVC to improve power system voltage stability YWang HChen RZhou Electrical Power and Energy Systems 22 2000 * On pole assignment in multi-input controllable linear systems WMWonham IEEE Transactions on Automatic Control 12 1967