ISBN 978-93-84468-- Proceedings of 5 International Conference on Future Computational echnologies (ICFC'5) Singapore, March 9-3, 5, pp. 96-3 Dynamic Modeling of Rotary Double Inverted Pendulum Using Classical Mechanics Bipin Krishna, Deepak Chandran, Dr. V. I George 3, and Dr. I. hirunavukkarasu 4,,3,4 Department of Instrumentation & Control Engineering, Manipal Institute of echnology, Manipal, Karnataka, India bipin.monayi@gmail.com Abstract: Modeling of nonlinear systems always play a vital role in the design of advanced control system techniques. An accurate model is the success of any type of control system design. Pendulum systems are well known and good bench mark demonstrations of automatic control techniques. hey are nonlinear, unstable, non-minimum phase systems which showcase modern control methods. In this paper the full dynamics of the Parallel Rotary Double Inverted Pendulum (RDIP) are derived using classical mechanics and Lagrangian formulation. Keywords: Rotary Double Inverted Pendulum, Modeling, Classical Mechanics.. Introduction A variety of inverted pendulum designs are available in the literature. he system configuration depends on two factors, the method of actuation and the number of degrees of freedom. here were two types of actuation reviewed, linear and rotary. he simplest controllable inverted pendulum would consist of a pendulum link directly coupled to a motor shaft must have at least two degrees of freedom, one for the position of the base of the pendulum and the other for the pendulum angle []. For higher degrees of freedom, either more single degree of freedom links are added, or the existing links are allowed to move in multiple dimensions. Rotary Double Inverted Pendulum (RDIP) as shown in Figure., an extended version of Rotary Inverted Pendulum is considered for the further discussions. Considering unequal masses and stabilizing the system with respect to the center of gravity which is an actual need in aircraft, ship and automobile systems, this can easily be simulated using RDIP. he control objective is to balance the pendulums in the upright position. Many engineering applications need a compact and accurate description of the dynamic behavior of the system under consideration. his is especially true of automatic control applications. Dynamic models describing the system of interest can be constructed using the first principles of physics, chemistry, biology, and so forth []. In this paper the dynamics of the RDIP are derived using the rotational geometry [3] of the system which is explained in section II. Many papers have only considered the rotational inertia of the pendulum for a single principal axis or neglected it altogether [4]. he system dynamics for Rotary Double Inverted Pendulum with a full inertia tensor using a Lagrangian formulation are presented in this paper. Also a linearized model is obtained by neglecting the disturbance torques. Simulation results show the open loop system characteristics.. Mathematical Modeling of Rotary Inverted Pendulum. Fundamentals he physical structure of the RDIP is as shown in Figure with two pendulums of different lengths which accounts of different masses on both sides, where the related physical parameters of the system are listed in the http://dx.doi.org/.7758/ur.u357 96
able. he DC motor is used to apply a torque to the rotating arm and the link between rotating arm and Pendulum arm & is not actuated but free to rotate. he horizontal arm output is angular displacement. Initially two pendulums will be in the pendant position. ie q=q= o. As the shaft rotates, the rotating beam also gets rotated. So a centrifugal force will be developed at both ends. his force is converted to the force which rotates the pendulums to the inverted position. Fig. : Schematic of Rotary double inverted pendulum system.. ABLE I: Definition of parameters related to rotary double inverted pendulum Parameter Definition Value M Centre of mass of pendulum.5 Kg M Centre of mass of pendulum.3 Kg L Distance from joint to Centre.4 m of mass of pendulum L Distance from joint to Centre.3 m of mass of pendulum M Mass of the rotating arm.5 Kg L Length of the rotating arm.5 m β Pendulum angle with respect rad to inertial axis. β Pendulum angle with respect rad to inertial axis. α Angular displacement of rad b, b, b τ τ, τ 3 rotating arm Viscous coefficients of rotating arm, pendulumand pendulum respectively orque experienced by rotating arm Disturbance torque experienced by pendulum and pendulum.4,.3,.88 M- ms N-m N-m orque constant.5 N.m/A Back emf constant. Volt/rad R Resistance of motor circuit Ω A right hand coordinate system has been used to define the rotation of horizontal arm and the two pendulum arms. he coordinate axes of the rotating arm and two pendulum arms are the principal axes such that the inertia tensor are diagonal in the form as in (). J J J 3 J J J xx xx x3x J J yy J J y y J J y3y zz zz z3z () he angular rotation of rotating arm α, is measured in the horizontal plane where a counter clockwise direction (when viewed from above) is positive [4]. he angular rotation of pendulum, β, is measured in the vertical plane http://dx.doi.org/.7758/ur.u357 97
where a counterclockwise direction (when viewed from the front) is positive, same as in pendulum is β, when pendulums are hanging down in the stable equilibrium position β = β =. he dynamic model of the RDIP is derived based on the following assumptions, he motor shaft and rotating arm are assumed to be rigidly coupled and infinitely stiff; Pendulums are assumed to be infinitely stiff; he coordinate axes of rotating arm and pendulums are the principal axes such that the inertia tensors are diagonal he motor rotor inertia is assumed to be negligible. However, this term may be easily added to the moment of inertia of rotating arm Only viscous damping is considered. All other forms of damping (such as Coulomb) have been neglected. Lagrangian Formulation Using Classical Mechanics he Lagrangian L, of a dynamical system is a mathematical function that summarizes the dynamics of the system. For a simple mechanical system, it is the value given by the kinetic energy of the particle minus the potential energy of the particle but it may be generalized to more complex systems. It is used primarily as a key component in the Euler Lagrange equation. In classical mechanics, the natural form of the Lagrangian is defined as the Kinetic Energy,, of the system minus its Potential Energy, V, L=-V Rotation matrix for rotating arm and pendulums are defined as follows. Rotation matrix from the base to the rotating arm is given by, cos( ) sin( ) R sin( ) cos( ) () he rotation matrix from rotating arm to the pendulum is given by (multiplying a diagonal matrix that maps the frame to frame with the rotation matrix of ) cos( ) sin( ) sin( ) cos( ) R sin( ) cos( ) cos( ) sin( ) Similarly rotation matrix from rotating arm to the pendulum is given by cos( ) sin( ) sin( ) cos( ) R3 sin( ) cos( ) cos( ) sin( ) Velocities of the arms are defined as: he angular velocity of horizontal arm is given by [ ] Initially the base frame is considered to be rest so that the joint between base and rotating arm is also at rest V [ ] (5) (3) (4) Velocity of frame of reference is given is by [ L ] herefore the total linear velocity of the horizontal arm is given by V V [ L ] [ L ] (6) Angular velocity of pendulum is given by [ ] R [ cos( ) sin( ) ] (7) otal linear velocity of the centre of mass of pendulum is given by http://dx.doi.org/.7758/ur.u357 98
Lsin( ) V R ( [ L ] ) [ l ] Lcos( ) l l sin( ) (8) Where velocity of joint between rotating arm and pendulum in reference frame is given by [ L ] Which in reference frame gives R( [ L ] ) Angular velocity of pendulum is given by 3 [ ] R3 [ cos( ) sin( ) ] (9) otal Linear velocity of pendulum (as in the case of pendulum) is given by V3 R3 ( [ L Lsin( ) ] ) 3 [ l ] Lcos( ) l lsin( ) () Energies of the arms are defined as: For rotating arm, Potential energy is given by Kinetic energy is, k ( V m V J ) ( ml Jzz) () Potential energy of pendulum is given by P m gl cos( ) () And Kinetic energy is, k ( V mv J ) m ( L sin ( ) ( Lcos( ) l ) l sin ( )) ( Jxxcos ( ) (3) sin ( ) Jy y Jz z) Potential energy of pendulum is given by P m gl cos( ) (4) Kinetic energy is given by K ( V 3 mv 33 J33 ) m ( L sin ( ) ( Lcos( ) l ) l sin ( )) ( (5) Jx3x cos ( ) sin ( ) Jy3 y Jz3z ) otal potential energy is Ptotal P P P and total kinetic energy is Ktotal K K K he mathematical equation can be derived using Lagrangian, L=KE-PE, where KE is the kinetic energy and PE is the potential energy. he Lagrangian equation can be written as, d L ( L / qi ) bi qi Qi dt qi (6) Where, q [ ] i is the generalised coordinate, b [ ] i b b b is generalised viscous damping coefficient. Q [ 3] i Be the generalised force (torque including disturbance torque). We can write the Lagrange function as L=KE-PE as follows, http://dx.doi.org/.7758/ur.u357 99
L ( ml Jzz) m ( L sin ( ) ( L cos( ) l ) l sin ( )) ( Jxx cos ( ) sin ( ) Jy y Jzz) m ( L sin ( ) ( Lcos( ) l ) l sin ( )) ( Jx3x cos ( ) sin ( ) Jy3 y Jz3z) mgl cos( ) (7) mgl cos( ) By using (6) and (7) dynamic equation can be written as, A A A3 A A A A 3 A A3 A3 A 33 A 3 3 (8) Where, A ml J m L m l sin ( ) m L m l sin ( ) J sin ( ) J sin ( ) A m l Lcos( ) A m l Lcos( ) 3 3 A ml L cos( ) A ( ml J ) A3 A3 mll cos( ) A A ( m l J ) 3 33 3 (9) A m l Lsin( ) m l sin( ) m l Lsin( ) m l sin( ) J sin( ) J sin( ) b 3 A ml sin( ) ml g sin( ) b J sin( ) A3 ml sin( ) mlg sin( ) b J3 sin( ) Since the arms are long and slender moment of inertia is considered to be negligible, more over the arms have rotational symmetry such that the moment of inertia in the principal axes are equal thus inertia tensor can be approximated as follows, J xx J xx J x3x J J yy J J J y y J J3 J y3y J3 J J J J J J zz zz z3z 3 Above dynamic equation can be written in a little easier way by making the following substitution: () otal moment of inertia of rotating arm about the pivot point, J J ml () Moment of inertia of pendulum about its pivot point, J J ml () Moment of inertia of pendulum, 3 3 (3) J J m l otal moment of inertia experience by the motor when pendulum and are in hanging position, J J m L m L J ml m L m L (4) From (8) the control input is the torque applied to the pivot of the rotating arm. DC motor is used to drive the rotating arm, so the voltage is taken as the control input. As far as we are neglecting the effect of inductor, the torque and the voltage can be related by the equation, KmV KmKb (5) R R http://dx.doi.org/.7758/ur.u357
Where are the motor parameters mentioned in the able. A compact form can be obtained by substituting ()-(5) into (8), thus obtaining a coupled electro mechanical equation as follows, A A A K 3 m A A A R + = (6) 3 A3 A3 A 33 Where, A J m l sin ( ) m l sin ( ) J sin ( ) J sin ( ) A m l Lcos( ) A m l L cos( ) 3 3 A m l L cos( ) A J A A m l L cos( ) A A J 3 3 ' A sin( ) J ml g sin( ) b ' A m l Lsin( ) m l sin( ) m l Lsin( ) m l sin( ) 3 33 KmKb J sin( ) J3 sin( ) ( b ) R ' A3 sin( ) J 3 mlg sin( ) b.3 Linearized state equation Linearized equation of the dynamic system for the two equilibrium position: upright and downward are derived below..3. Upright position Finding the linearized model using the equilibrium point where series at x= 3 (7). After expanding the aylor Sin(x),, cos(x) We can make approximation of the nonlinear equation in (6) around the equilibrium point thus equation became, K K K V J m l L m l L b m l L J m l g b R R m b m ( ) ( ) ( ) ( ) m l L( ) J m l g( ) b 3 3 Here x can be taken as x= [ ] be the state variable and control input be the voltage, v. hen (8) can arrange in the form of P x Qx Ru x P Qx P Ru : Ax Bu (8) (9) Where, P J R= ml L mll Q KmKb Km ( b ) R R ml L J m gl b m ll J m 3 gl b Disturbance torque may be neglected in the analysis, so the R matrix became K R [ m ] R http://dx.doi.org/.7758/ur.u357
.3. Downward position In downward position the operating points are, From the aylors series, at the small values of x, he nonlinear equation in (6) may be approximated around the equilibrium point becomes, K K K V J m l L m l L b m l L J m l g b R R. hus equation m b m ( ) ( ) ( ) ( ) m l L( ) J m l g( ) b 3 3 Here x can be taken as x= [ ] be the state variable and. Equation (3) can rearrange in the (3) form of P x Qx Ru x P Q x P R u : A x B u (3) Km P J m l L m l L Q R [ ] R KmKb ( b ) R ml L J m gl b m ll J m 3 gl b 3. Simulation Results and Discussions Consider the parameters of the RDIP system as shown in able. Simulation of the derived model is carried with these parameters. he zero input response (ZIR) of the system near the equilibrium point 8 is shown in Figure. Since the open loop response of the system is shown in Figure the pendulums will settle at the stable equilibrium point (, ) which indicates that the system is tracing the dynamics as per the modelling. he response of the rotating arm for the same is shown in Figure 3. Fig. : Zero input response of β and β for the initial condition β ()= 75 and β () = 78. http://dx.doi.org/.7758/ur.u357
4. Conclusion Fig. 3: Zero input response of rotating arm he full dynamics of the rotary double inverted pendulum is obtained using classical mechanics and Lagrangian formulation. Linearized equations for both the upright and downward positions of both pendulums have been derived, as well as the coupled motor pendulum equations. It also observes that the derived model has the same general form of the pendulums. he results may be compared with the experimental data and suitable control law may be applied to stabilize the system as the future scope. 5. References [] James Driver, Dylan horpe, Design, Build and Control of A Single / Double Rotational Inverted Pendulum, M.ech hesis, University of Adelaide, Australia, 4. [] Vincent Verdult, Nonlinear System Identification: A State-Space Approach, P.hD hesis, University of wente, Place,, pp 3-65. [3] Benjamin Seth Cazzolato, Zebb Prime On the Dynamics of Futura Pendulum, Journal of Control Science and Engineering, Volume. [4] O. Egeland,. Gravdahl, Modeling and Simulation for Automatic Control, Marine Cybernetics, rondheim, Norway,. [5] Pakdeepattarakorn, P, hamvechvitee. P, Songsiri. J, Wongsaisuwan. M, Banjerdpongchai D, Dynamic models of a rotary double inverted pendulum system, ENCON, IEEE Region Conference, 4, pp 558-56. [6] K. Furuta, M. Yamakita, and S. Kobayashi, Swing-up control of inverted pendulum using pseudo-state feedback, Journal of Systems and Control Engineering, vol. 6, no. 6, 99, pp. 63 69. http://dx.doi.org/.43/pime_proc_99_6_34_ http://dx.doi.org/.7758/ur.u357 3