Modeling And Control of 3 Linkbiped Leg using PID Controller

DOI : 10.17577/IJERTV3IS041133

Download Full-Text PDF Cite this Publication

Text Only Version

Modeling And Control of 3 Linkbiped Leg using PID Controller

International Journal of Engineering Research & Technology (IJERT)

ISSN: 2278-0181

Vol. 3 Issue 4, April – 2014

Rakesh Gautam

Electrical Engineering Department Veermata Jijabai Technological Institute Mumbai, India

Rajesh Ingle

Electrical Engineering Department Veermata Jijabai Technological Institute Mumbai,India

Milin Nagpure

Electrical Engineering Department Veermata Jijabai Technological Institute Mumbai, India

Abstract This paper aims to develop a simple mathematical modeling of 3-link system having four degrees of freedom. This kind of research has started by the introduction of Wabot from Waseda University in 1973, many humanoid robot models have been developed around the world that can walk and even perform some specific task with stability. Various biped robots have successfully shown their capabilities but still it has many technical challenges that robotics researchers are trying to solve. For modeling of biped robot leg or any multi body system different methods are used like Newton-Euler, Lagrange-Euler, we are implying the same method for modeling of biped leg. By using Denavit Hartenberg convention for modeling kinematics for multi body system, we give an algorithm for derivation of Lagrange-Euler equations of motions and implying PID control to control the joint angles for a general biped robot leg. We have considered a biped robot leg with three link having four degrees of freedom. We are showing controlled output plot of 4th angle of our system by using trial and error method to tune PID controller.

Keywordsbiped;DH algorithm;PID controller


    A robot is introduced as an electro-mechanical machine that can walk or stir around, operate a mechanical limb, sense and change its environment, or exhibit intelligent behavior, especially behavior which mimics humans. Fact fully, the general behavior was not of high intelligence, but now a day robots have considered as machines that are stronger than humans and can do tasks faster and with higher accuracy. That's what makes the current field of robotics so incredibly fascinating. There are different kinds of robots in the field, from welding robotic arms in the automotive industry to tiny Nano robots. One specific group of robotic machines is classified as humanoid robots. In this work, humanoid robots are considered. Humanoid robotics is an rising technology that which would be an important part of our daily life in the coming decades. Researchers and engineers are developing humanoid and biped robots that show various human-like characteristics, since these robots should substitute humans in various tasks in fields. Humanoid robots that 022walk on two legs are called bipeds. The conventional formalism to derive the equations of motions such as Newton-Euler, Lagrange Euler [1].the complexity of such robot makes it very difficult to derive equations by hand. We will show that application of

    Denavit Hartenberg convention for modeling robot kinematics can facilitate automatic derivation of Lagrange-Euler equations of motion.[2][5] To obtain a controlled and bounded output we are using PID controller. In particular, we propose a mathematical formalism for modeling of a general humanoid robot. We are using mat lab for solving the Lagrange equation of motion . Modeling a humanoid robot


    A.Robot Description

    We are considering a biped robot with 4 degrees of freedom, there is four joint one in thigh ,one in knee and tow joints on ankle and following are the concepts which we are using to model our robot the joint parameters are given below with the explanation of DH algorithm.[6]


    Fig : Joint Definition of Biped Leg

    We have taken the value of mass and length of each link by some well known existing robots such as CHARLIE I [5].

    mass needs a Jacobian matrix, linear or revolution, based on whether the motions are rectilinear or rotary.



    Mass of link 1 (m1)

    1.7229 kg

    Mass of link 2 (m2)

    0.783 kg

    Mass of link 3 (m4)

    0.886 kg

    Length of link 1(a1)

    0.775 m

    Length of link 2(a2)

    0.425 m

    Length of link 3(a4)

    0.122 m

    Position of centre of mass of link

    1 (a1c)

    0.627 m

    Position of centre of mass of link

    2 (a2c)

    0.265 m

    Position of centre of mass of link

    3 (a4c)

    0.035 m

    J vi

    zi1 On Oi1

    J i J


    wi i1

    B. Lagrange-Euler formulation of robot dynamics based on denavit hartenberg convention

    Where J vi represents the velocity jacobian matrix and

    J wi represent the angular jacobian matrix.

    D. Equation of Motion

    The equations of motion of the robot can be derived using the well known Lagrange-Euler equations. This equation derives using the kinetic and potential energy of every link in the system:

    d K K P Q


    To derive Lagrange-Euler equations of motion in an automatic

    dt q q


    way, we can make use of Denavit Hartenberg convention for description of robot kinematics.[2][6] The Denavit Hartenberg convention is a commonly used method to assign coordinate frames to different links in a robotic arm. This method ensures that the position and orientation of each frame can be described by only four parameters, which simplifies the kinematic analysis and allows us to derive the equations of

    motion using the kinetic and potential energy as in the

    Where K and P represent the kinetic and potential energy respectively and Q is a vector with non conservative forces

    like damping, friction and applied torques. The kinetic energy for a system .We can calculate Kinetic and Potential energy for whole system by using following expressions :

    K 1 qT n m J T J J T R I RT J

    Lagrange-Euler equations. The convention is normally used to model robotic arms with a fixed base and one tip at the end. Humanoid robots, however, do not have a fixed base and in

    2 i1

    i vi vi

    wi i i i

    wi q


    general have two legs which can be seen as tips. This means that we, in some sense, have to modify the standard approach of deriving the equations of motion with the Denavit Hartenberg convention.

    We can simplified it as follow :

    D n m J T J

    • J T R I RT J


    i vi vi

    wi i i i



    For 3 link biped robot the joint angle parameters is calculated as in following table

    Where D is called the inertia matrix. The potential energy of a system or part of a system with links i in a gravity field g

    with its center of mass at position for each link oci





    Joint Angle

    Joint Length

    Link Angle

    Link Length

















    P m g T o



    The equations of motion can be calculated with Lagrange Euler equation, but we can further simplify the algorithm. If it's assumed that there are no external forces acting on the system but the applied torques, it can easily be seen that (2) can be rewritten as:

    C. Jacobian Matrices

    Jacobian matrices are the basic elements in building a dynamic model. Jacobian matrices are divided by actuation types. Each

    d L dt qi

    • L




      Where L K P and qi and i are the joint variable and


      joint torque of link i . So we assume there is no damping or friction acting in the joint and Q only contains joint torques. The Lagrange-Euler equations for each link i can be written as:


      0 0




      n n dij

      1 dkj P

      dij q j q

      2 q

      qk q j q


      F. PID design


      k 1 j1 k i

      i (7)

      The general form to implement a PID controller on a system can be give as following :

      Which in matrix form can be written as :

      K P e K D e K I e

      D q C q G



      Similarly in our case we have four inputs so the equation for

      Where D is inertia matrix, C is coriolis and centrifugal

      matrix and G is gravity vector. The Denavit Hartenberg convention is perfectly suitable for modeling robotic arms and

      each input would be given as:

      1 P 1 D 1 I 1

      K e K e K e


      as we showed it can also be used to model a humanoid robot.

      E. implementation of PID controller

      As we can see on equation (8) , the equation of motion can be arranged as following manner

      2 K

      3 K

      P2 e1




      • K





      • K

    I 2

    I 3





    q D1 C G





    4 K P4 e4 K D4 e4 KI 4 e4

    1. Solution of Ordinary Differential Equations:


      Now we are giving final set point f


      To understand whole programming we can simply write the equations which we are solving on Mat lab. So our complete



      system equations are :



      x1 1 1









      2 2 2


      The error signal is difference between set point f and initial

      x3 3 3

      values of joint angles that is 0

      can be represented as:

      e1 1 1

      the error signals for each joint


      x4 4 4



      e2 2 2





      3 3 3


      2 D 1 C G 2

      e4 4 4




      We knows that for every system ideally the error signal should

      be zero, so we can give the initial position as :




      By trial & error, the 2 controllers parameters were tuned to have the best performance. The best values for the parameters was found to be

      K P1





    We are performing the solution on mat lab using function ode45 to solve the differential equation which we have as


    K I 1 0


    equation of motion of 3 link biped robot and we got output as

    a plot of joint angle for theta 4. We have considered step input to solve equations (i.e input is 4*1 matrix with all element

    P 2

    K D 2



    equals to 1) This is a time in sec versus angle in radian plot. Theta 4 angle plot is given as follow:

    K K I 2 0

    PID K 10


    K D3 0

    K 0

    I 3

    K P 4 15

    K 7

    D 4

    K I 4


    Actually, by observing the structure of above ODE with control, we can see (roughly):

    Fig : Joint Angle theta 4 plot

      • KP

        is related to direct error and to speed of

        We can clearly seen from the plot of theta 4 that it has


      • K D is related to speed of interaction with change in states.

      • K I is related to overall error cancelation.

        However, above arguments are rough because of the high nonlinearity of the equation that:

      • produces sensitive interaction between controller components .

      • Small Changes in controller parameters would produce more overshoots and oscillations

      • Controller parameters are highly sensitive to initial and final positions.

      • So, online tuning of the PID should be considered for global system operation (i.e. non-fixed final positions, trajectory tracking, etc.)

    We are showing controlled output only for 4th angle that is theta 4 because highly nonlinear nature of the system and output is very sensitive to initial and final position of each joint angle. We are applying trial and error method for tuning of PID controller.

    acceptable overshoot and settling time and it is showing linear behavior.


    We have shown an altogether a different frame work in which a system with degrees of freedom greater than two can be modeled and controlled using fundamentals pendulum) which could be designed. Due to the unavailability of strong computational hardwares, this forms the basis of our future of D-H algorithm signifying symbolisms. Here we notice that for a given control input we get an output which is bounded and it can be interpreted mechanically. But we have also observed that the system does not follow the reference value but has a potential for inclusion of a controller [5] to do so similar to the controller strategies explained in [5], we can have various other controllers (i.e. those which can be implemented for control of a standard double inverted work.


  1. Bipedal Walking for a Full-sized Humanoid Robot Utilizing Sinusoidal Feet Trajectories and Its Energy Consumption by jeakweon Virginia Polytechnic Institute and State University.

  2. S. Collins. Flame system identification results.Technical report, Delft University of Technology, 2008.

  3. J.A.J. Baelemans, P.W.M. van Zutven, H. Nijmeijer, Model parameter estimation of humanoid robots using static contact force measurements in IEEE International Symposium on Safety Security and Rescue Robotics, Linköping, Sweden, 6, (2013)

  4. J. Denavit and R.S. Hartenberg. A kinematic notation for lower-pair mechanisms based on matrices. ASME Journal of applied mechanics, page 215221, 1955.

  5. P.W.M. van Zutven, D. Kosti, H. Nijmeijer, Foot placement for planar bipeds with point feet, in IEEE International Conference on Robotics and Automation (ICRA), Editor: Paul Y. Oh, Saint Paul, USA, 983- 988, (2012)

  6. Modeling of 3 link Biped Using DH algorithm Rakesh Gautam, Mangesh J Bhagat Sudip Dongare ,International Journal of Engineering and Advanced Technology, volume 3 issue 3 , page no 320-322.

Leave a Reply