8 Simplified Modelling of Legs Dynamics on Quadruped Robots ’ Force Control Approach

The development of the service and intervention robotics has stimulated remarkable projects of mobile robots well adapted to different kinds of environment, including structured and non-structured terrains. On this context, several control system architectures have been proposed looking for the improvement of the robot autonomy, and of the tasks planning capabilities, as well reactive characteristics to deal with unexpected events (Medeiros et al., 1996; Martins-Filho & Prajoux, 2000). The proposed solutions to the locomotion on hazardous and strongly irregular soils include adapted wheels robots, rovers, robots equipped with caterpillar systems, and walking robots. Some of this robot designs are inspired on successful locomotion systems of mammals and insects. The legged robots have obtained promising results when dealing with terrains presenting high degrees of difficulty. This is quite curious to notice that ideas concerning this robotic locomotion system have been present since the first idealistic dreams of the robotics history, and nowadays this approach has gained the interest and attention of numerous researchers and laboratories. Let's mention some of the relevant works involving legged robots: Hirose et al. (1989) proposes an architecture for control and supervision of walking; Klein and Kittivatcharapong (1990) study optimal distribution of the feet-soil contact forces; Vukobratovic et al. (1990) work on the robot dynamics modelling and control; Pack and Kang (1995) discuss the strategies of walk control concerning the gaits; Perrin et al. (1997) propose a detailed platform and legs mechanisms modelling for the dynamics simulation; Tanie (2001) discusses the new perspectives and trends for the walking machines; Schneider and Schmucker (2001) work on force control of the complete robot mechanical system.


Introduction
The development of the service and intervention robotics has stimulated remarkable projects of mobile robots well adapted to different kinds of environment, including structured and non-structured terrains. On this context, several control system architectures have been proposed looking for the improvement of the robot autonomy, and of the tasks planning capabilities, as well reactive characteristics to deal with unexpected events (Medeiros et al., 1996;Martins-Filho & Prajoux, 2000). The proposed solutions to the locomotion on hazardous and strongly irregular soils include adapted wheels robots, rovers, robots equipped with caterpillar systems, and walking robots. Some of this robot designs are inspired on successful locomotion systems of mammals and insects. The legged robots have obtained promising results when dealing with terrains presenting high degrees of difficulty. This is quite curious to notice that ideas concerning this robotic locomotion system have been present since the first idealistic dreams of the robotics history, and nowadays this approach has gained the interest and attention of numerous researchers and laboratories. Let's mention some of the relevant works involving legged robots: Hirose et al. (1989) proposes an architecture for control and supervision of walking; Klein and Kittivatcharapong (1990) study optimal distribution of the feet-soil contact forces; Vukobratovic et al. (1990) work on the robot dynamics modelling and control; Pack and Kang (1995) discuss the strategies of walk control concerning the gaits; Perrin et al. (1997) propose a detailed platform and legs mechanisms modelling for the dynamics simulation; Tanie (2001) discusses the new perspectives and trends for the walking machines; Schneider and Schmucker (2001) work on force control of the complete robot mechanical system.

The Context of this Study
A walking robot can be described as a multibody chained dynamical system, consisting of a platform (the robot body) and a number of leg mechanisms that are similar to manipulator robotic arms. Considering the locomotion control of robots with significant masses, the main approaches are based on force control, this means that the leg active joints actuators produce torques and/or forces resulting on contact forces in the feet-soil contacts. For instance, this The Sect. 2 presents the dynamical model of the leg mechanisms, discusses the computation of important matrices appearing in this model, and analyses the workspace of the proposed leg design. The analysis of details of the dynamical model, that can be simplified considering the physical characteristics of the studied walking robot, is shown in Sect. 3. The following section (Sect. 4) describes the numerical simulations, and presents the obtained results and its analysis. The Sect. 5 closes the chapter with the work conclusions and comments about the future works on this research subject.

Dynamical Modelling of the Leg Mechanism
The leg mechanism model is based on the actuators dynamics, composed by servomotors and reductions gears, as well the friction effects on this active joints (Coulomb and viscous friction). Moreover, all the robot's links are taken as been completely rigid, a usual model assumption.
Let q i =θ i the i-th rotational joint angle, the complete state configuration of each leg is defined by a vector of generalized coordinates as follows: Considering the kinematics energy, E c , and the potential energy, E p , the conservative Lagrangian for the system is given by: And the equations of motion of this dynamical system are described as follows: where L(q, dq/dt) = E c -E p , and Q i is the vector of generalized force corresponding to the generalized coordinate q i . The kinematics energy of each leg mechanism is obtained by the summation of the leg links energies, K ci .
Considering the linear velocity of each link's centre-of-mass, the vector dp i /dt, and the angular velocity ω i , the resulting equation is: are the i-th row vectors of the matrix J (dimension 3x3) for the linear velocities of the links 1, 2 and 3, and are the i-th row vectors of the matrix J for the angular velocities of the links 1, 2 and 3. The kinematics energy of each link results of the translational and rotational terms: where m i and I i are the mass and the inertia tensor expressed in the base coordinates system, respectively. Applying the results of Eq. (4) in the Eq. (5), the expression for the total kinetics energy of each three degrees-of-freedom leg.
The term H(q) can be defined as a symmetric square matrix based on the each link's tensor of inertia. Consequently, is possible to obtain: The matrix H(q) represents the mass characteristics of the leg mechanism. This matrix is called matrix of inertia tensor. The matrix elements H ii (q) are related to the effective inertias, and the H ij (q), with i≠j, are related to the coupling inertia. Using these properties, the Eq. (5) can be re-written in a compact form: The potential energy E p , considering a leg mechanism composed by rigid links, is function exclusively of the gravity. The vector g represents the gravitational acceleration. The overall potential energy of each leg is given by: where r i is the position of the centre-of-mass of each link, described in the base coordinates system.
The Lagrangian formulation provides the motion equations of the robotic leg mechanism system, using the kinematics and potential energies, the forces and torques actuating on the leg (excluding the gravitational and inertial forces, i.e. the generalized forces). This formulation results in the following equation: Considering that the derivative of E c is obtained as follows: the time derivative of H ij is given by: For the Eq. (14), the partial derivative of r ij with respect to q i is equal to the j-th component of the i-th column of the Jacobian matrix J l (linear velocities). The equation becomes: This term is called gravitational term, and it is represented by G i : Considering the original equation of the Lagragian formulation (Eq. (9)), and taking into account the last developments, the resulting equation is given by: where h ijk =∂H ij /∂q k The Eq. (17) can be rewritten under a compact form as follows: is a matrix 3x3 that represents the inertial torques, including the torques resulting of link interactions; C(q,dq/dt) is a matrix 3x3 that represents the centrifugal and Coriolis forces; U is a vector 3x1 of control torques (to be defined by the robot control function), J(q) is the Jacobian matrix, also with dimension 3x3, and F is the vector 3x1 of generalized forces/torques produced by the environment of the work space (this vector is expressed in the base coordinate system) (Asada, 1986;Cunha et al. 1999).

Computation of the Matrices D(q), C(q,dq/dt) and G(q)
The locomotion system of the considered quadruped robot controls independently each one of the leg mechanisms and their active joints. As a consequence, the overall robot control can be divided into the leg subsystems and integrated by the resulting efforts on the hips, finally closing the chained system. Based on this principle, the modelling of robot dynamics will consider the leg mechanisms initially independently. For the derivation of this leg model, it's necessary to obtain the matrices D(q), C(q,dq/dt), and G(q). Theses matrices expressions are determined by the equations of the direct kinematics for the proposed robot design. Adopting the Denavit-Hartenberg convention for manipulator robots (Spong & Vidyasagar, 1989), the direct kinematics provides the vector x of the leg-end position, The expression of this vector is: where a compact notation was adopted to simplify the equation: c i = cos(θ I ), c ij = cos(θ i +θ j ), s i = sin(θ I ), s ij = sin(θ i +θ j ). The Jacobian matrix J(q) is determined as follows: The linear and angular velocities of the leg links, with respect to their centres-of-mass, are given by: The matrix D(q) can be now determined. Its expression is given by: where m 1 , m 2 and m 3 are mass value of the links, and I 1 , I 2 and I 3 are the moments of inertia with respect to the centre-of-mass of each leg link.
The matrix C(q,dq/dt) is composed by the elements h ijk that are multiplied by the vector dq/dt. The elements h ijk are determined using the matrix D(q) thought the relation h ijk = (∂D ij /∂q k ). Consequently, is possible to obtain: The matrix G(q) is given by the expression of the gravitational contributions Taking the equations of the system dynamics, the robot system states can be obtained directly by the expression of the joints acceleration d 2 q/dt 2 . This expression is given by: On this expression, the matrix D(q) is invertible. It's a consequence of the leg mechanism design, specially chosen to avoid the singularities and allowing the leg to produce the required efforts. The state vector , denoting the joint variables, determines uniquely the foot position. This vector is obtained by integrating the Eq. (25).

The Workspace of the Leg Mechanisms
The workspace for a given legs configuration of the robot consists of all possible translations and rotations for the robot components (robot body and leg links). The physical constraints of each joint, as well the free space restrictions, are also considered for the workspace determination. We search the intersection of the so-called kinematic and static workspace to have the resultant workspace. This approach is usually applied in geometry optimisation of the mechanism design, determination of the number of joints and selection of the active joints. It's also applied in the determination of forces and torques on the active joints, and computation of force distribution among supporting legs (Klein & Kittivatcharapong, 1990;Zhang et al., 1996a;Zhang et al., 1996b). There are two methods that can be used to analyse the leg kinematic workspace: the forward analysis, and the inverse analysis. Forward analysis determines the workspace using a function of space configuration w=f(q), with q=[q 1 q 2 q 3 ] T , considering the physical limits for q. Inverse analysis determines the workspace through the inverse function, i.e. mapping the function q=g(w) for a given mechanism position and orientation, and verifying if the configuration relative to q is located inside the allowed space. The kinematic workspace in this work is investigated by the inverse kinematics equations. Four constraints must be taken into account in the kinematic workspace analysis of the leg mechanism: the joints coordinates, the leg velocity limit, the leg acceleration limit, and the geometric interference of the leg. Considering the performance of the present available actuators, and the development of geometric studies concerning the robot platform, we can say that the main constraints to the velocity and acceleration limits of the leg movements are the physical joints limits and its geometric interference (Zhang et al., 1996a). Therefore, the problem constraints can be expressed by: where θ ij is the j-th joint of the i-th leg. Rewriting this equation using a vector of kinematics' constraints, we have: The variation of θ ij angles for a specific i-th leg is function of the robot body position and orientation. The i-th foot position can be obtained by inverse analysis. Considering the feet positions, the position and the orientation of the robot body, we can compute q=[q 1 q 2 q 3 ] T .
The difference vectors, ∆q max = q max -q i and ∆q min = q min -q i , are used to determine when a boundary point is attained, i.e. if ∆q max or ∆q min is a null vector the leg configuration is on a workspace frontier. Scanning all the joint angles ranges, the total workspace of the leg mechanism is determined (Zhang et al. 1996a).
On the other hand, the study of the robot static workspace considers three types of constraints: the limits of force and torque on active joints, the maximum and minimum reaction forces on the soil-feet interface, and static friction coefficient of the feet-soil contact.
The expression of these constraints, considering the j-th joint of the i-ith robot leg, is given by: where F ij is the joint force, T ij is the joint torque, f iz is the reaction force on the soil-foot interface, and µ is the static friction coefficient. The ratio µ t between the tangent and normal components of the reaction force on the soil-foot contact must respect the friction constraint, i.e. µ t ≤µ (Klein & Kittivatcharapong, 1990;Martins-Filho & Prajoux, 2000;Zhang et al., 1996b). For the analysis of the constraints listed above, we consider the static constraint vector defined by: The difference vectors, ∆c max = c max -c i and ∆c min = c min -c i , are used to determine when a boundary point is attained, i.e. if ∆c max or ∆c min is a null vector the leg configuration is on a workspace frontier. Scanning all the c vector range, the total static workspace of the leg mechanism is determined (Zhang et al. 1996b). Graphical representations of the kinematic and static workspaces, considering the adopted quadruped robot and leg mechanisms design, are shown in the Fig. 3 and Fig. 4, respectively.

Analysis of Matrices C(q.dq/dt) and G(q)
The position control problem of a system represented by the Lagrangian formulation can be solved through the application of a PD (proportional plus derivative) control approach. The PD control law is defined to determine the control torque to be produced on the active joints (Bucklaew et al., 1999). The expression of this proposed control is given by: where K p and K d are positive define matrices with constant gain values, and ) ( q q q d − = is the position error. Applying this control law on the expression of d 2 q/dt 2 , the vector dq/dt can be determined, and the vector q, the leg joints state, is available by integrating the differential equation. In this equation, the matrices C(q,dq/dt) and G(q) appear explicitly. Theses matrices must be computed at each new value of q and dq/dt, and these quantities change continuously with the time. For a system with tree degrees-of-freedom or more, as the case of the robot considered in this work, the computation requires a considerable number of arithmetic operations and amount of time of controller processing. This system is supposed to be working on real-time, and this computation charge and time can represent a difficulty or trouble. The elements of the matrix C(q,dq/dt) are computed using the matrix D(q). And this matrix D(q) is a function of the links' masses, of the linear and angular velocities of these links, and it is also a function of the links' moments of inertia (taken on their own centres-of-mass). It is computed at each variation step of q. If the masses of the robot's links are small comparing to the body mass, that's the case of the quadruped robot considered in this work, the respective moments of inertia are also small. Analysing the velocities, the linear and the angular, we see that if the robot is moving relatively slow (that's the case of when the robot is performing a safe and stable gait), these velocities values are low. The contribution of another term, the Coriolis force, is dependent of the link velocity, consequently the relative significance of the matrix C(q,dq/t) is low. The same conclusion can be taken of the analysis of the matrix G(q), the gravitational contribution, that's a direct function of the links' masses.

Numerical Simulations and Results
The proposed model simplification was tested through numerical simulations. The motion of the robotic leg mechanism was simulated using two dynamical modelling, the complete one and the simplified one. For these simulations, a closed loop control scheme was defined applying the PD strategy to define the active joints torques to be produced by the servomotors. The control of the leg motion aims to track desired trajectories of the joint angles vector. The analysis of the results is based on the comparative performance of the two different models and on the verification of the tracking errors. The simulation scenarios are defined in terms of leg manoeuvres involving the three active joints of the mechanism, taking into account the leg workspace limits. The values of the mechanism's physical parameters are defined based on a realistic future realization of a leg prototype. These parameters and the respective values considered on the numerical simulations are shown in the Tab  In the third and last manoeuvre, the leg mechanism was commanded using the third joint.  Considering the obtained results of numerical simulations (see Figs. 5,6,7,8,9 and 10), we can verify that the dynamical responses are approximately similar for the two models of the robot dynamics, with and without the matrices C(q,dq/dt) and G(q). The difference between the two models are limited to around 2 degrees on the steady state behaviour of the amplitude, and a delay around 10 degrees on the transitory phase. As an immediate consequence, the number of calculation operations for the determination of the value of robot's joints state, using the system accelerations, is significantly reduced. In terms of computation time, the estimation of gain is around 9% of reduction.

Conclusion
In this work, a dynamical model simplification was implemented and analysed considering a small quadruped mobile robot, equipped with pantographic leg mechanisms. This specific leg design and characteristics were considered, as well the context of realistic possible physical realization (dimensions, masses, inertias) of a laboratory prototype. A simplification was proposed aiming the reduction of computational efforts for the evaluation of the matrices C(q,dq/dt) and G(q), corresponding respectively to the centrifugal and Coriolis forces, and to the gravitational dynamical contributions.
The resulting advantages of the presented proposition were verified when comparing the numerical simulations of the leg mechanism motions taking the complete and simplified models. The obtained results of dynamical performance for both cases are very similar, i.e. the difference is around 1 degree on steady state, and a delay bellow 2 degrees on the transitory phase. On the other hand, the computation time reduction using the simplified model is quite expressive (around 9%). These two facts confirm the validity of using the proposed simplified model, it can be useful on experimental applications of locomotion control approaches based on the dynamical model of the walking robot. For instance, this time reduction can be advantageous for pre-computed torque and feedforward control approaches. Considering the critical requirements of the real-time control of a complex system as a legged mobile robot. The future works include the construction of the leg mechanism and robot prototypes, the application of the simplifications proposed here on this experimental legged robot, and the analysis of this system performance using diverse force control approaches.