The Mathematical Model and Simulation of A Quadrup
The Mathematical Model and Simulation of A Quadrup
The Mathematical Model and Simulation of A Quadrup
Abstract
Legged robots are capable of complex dynamic movements such as walking, running, and jumping. Quadruped
robots have the minimum number of legs to produce a triangular support polygon that allows the robot to walk with
a statically stable gait. To produce coordinated and effective motions for legged robots requires planning algorithms
that exploit the natural dynamics of a system. In order to quantify performance of the motions generated by these
algorithms, there is a need to develop a walking machine that can support such movements. The robot platform will
help advance knowledge in locomotion by demonstrating the feasibility of novel gait patterns and strategic motions.
In addition, it will promote the development of new control strategies to implement the required locomotion.
However, mathematical models of the robot need to be developed to help determine important parameters and
characteristics. A kinematic model was created by writing the forward and inverse kinematics of the robot. These
were then used to simulate a crawl gait pattern using MATLAB programming and Solidworks modeling software.
Leg designs created in SolidWorks were imported into MATLAB as standard transformation language (STL) files.
The geometry was then plotted as a series of polygons in 3-D space, and animated using homogeneous
transformations. The animations were used to calculate joint angles, foot trajectories, and visualize gait pattern
movements. Additionally, the equations of motion for the robot were developed using Newtonian mechanics to
determine the forces and torques necessary to hold its weight and achieve locomotion. By breaking down the model
down to its most simple components, the torques in each joints were solved for in terms of the design parameters,
reaction forces, joint positions, velocities, and accelerations. The results of the research provide a planar model of a
quadruped robot that will be useful in the analysis and design of a locomotive robot platform.
1. Introduction
1.1 legged robotics
Legged robotics is a continuously growing technology with more attention focused on dynamic control of such
robots during locomotion[1][2]. With better understanding of legged locomotion and movement capabilities, motion
algorithms can be improved to mimic more natural dynamic movement modeled after animal gait patterns[2][3].
Eventually, as movement capabilities of legged robot advance, so will their applications in various fields. Their
abilities can be expanded to rescue operations, unmanned exploration, pack-mules, and military operations[4]. In
order to improve and quantify motions, an appropriate platform that can support movements such as crawling,
walking, running, and jumping must be built. Before designing and producing a robot platform, the behaviors and
motions of legged robots must be understood through the analysis of a model.
A quadruped configuration was chosen for the robot platform. Four legs are the minimum legs required for a robot
to walk with a statically stable gait [5]. That is, a gait pattern where there are enough contact points to prevent a
tipping moment with the robot body[5][6][7]. Quadrupeds produce a triangular support polygon during their stable gait
patterns as depicted in Figure 1.
Figure 1. Comparison of different leg positions that provide a stable support (left) and an unstable support (right)
adapted from [5].
During a basic crawling gait, only one leg is actuated at a time leaving the remaining three legs supporting the
body. When the center of gravity, depicted by the circle in Figure 1, remains in the support triangle no tipping
moment occurs[6]. Although unstable positions are still possible, having the capacity to produce a support polygon
during locomotion makes quadrupeds more stable than bipeds and tripeds[5]. Six legged robots are known to be more
stable that quadrupeds, however, with the addition of more limbs the complexity of the system increases. More
actuators need to be controlled and many more variables are introduced which make motion planning more
difficult[5]. Quadruped robots offer a good balance between control complexity and stability of the walking patterns.
With more stable gait patterns the robot body is supported by three legs rather than two. In these gait patterns, each
leg is actuated separately. The transverse walk and rotary walk are examples of these patterns. Legs are actuated in
an order of 1, 3, 2, 4 in the transverse walk and 1, 2, 3, 4 in the rotary walk [2]. Due to the simplicity and stability of
walking gait patterns, it was chosen for computer simulation. With walking gait patterns, static stability and dynamic
control becomes easier to achieve compared to more complex gaits.
2. Methodology
To better understand the static and dynamic behaviors of a quadruped robot, a generalized frame of a quadruped
robot was modeled in two ways. First, gait patterns were animated through computer simulations using Solidworks
modeling software and MATLAB programming. From the gait pattern animations, leg positions, actuation angle
ranges of the limbs, relative velocities, and relative accelerations of the body can be determined. Then, analyses
were performed using Newtonian mechanics to model the dynamics of the robot. From the performed analysis the
torques necessary to achieve desired motion profile can be determined.
Additional concepts such as homogeneous transformations, forward and inverse kinematics were used to model
the quadruped robot. For robot kinematics it is important to be able to establish multiple coordinate systems and
relate each system to a fixed global coordinate axis. Homogenous transformations relate those coordinate axes by
combining operations of rotation and translation in a single matrix multiplication [9]. Forward and inverse kinematics
was helpful in trajectory planning of gait patterns and in determining important geometries for mechanics analyses.
Homogeneous transformations were also used to build the quadruped frame and animate gait patterns in computer
simulations.
Forward and inverse kinematics both involves using kinematic equations in order to determine the foot position of
the robot and to find the joint of the leg. In forward kinematics, the joint positions, or angles of each joint, are
known and the end effector position can be calculated. Conversely, in inverse kinematics, the foot position is known
and the related joint positions can be derived [10]. Modeling the motion and positioning of a two link leg model is
essential for the dynamics analysis of the robot as well as the gait animations. The two link leg model is seen in
Figure 3 where represents the position of the foot. and are the joint angles of the hip and the knee,
correspondingly, and denote the dimensions of the thigh and shank, respectively.
Figure 3. 2 link leg model used for deriving forward and inverse kinematics equations
Using forward kinematics for this model and known joint parameters, and , the foot position can be
calculated using equation (1) and equation (2).
.
(1)
(2)
Using inverse kinematics and a known foot end effector position is known and the joint parameters, and
, can be calculated using equation (3) and equation (4). Note that is a function of therefore, , must be
calculated first.
( )
√( )
(3)
( ) (4)
In order to understand the behaviors of a quadruped robot under certain static and dynamic situations, rigid body
analysis of the robot were conducted. For the analysis the following assumptions were made: all four legs are
identical, linkages have evenly distributed masses, contact with the ground occurs at a point actuators have
negligible mass, and all motions are planar. First, mechanical analysis of a single leg was conducted before the
quadruped robot was analyzed as a whole. Since all four legs are identical, the forces and torques present in one leg
are similar in the other three legs.
With the analysis for a single leg completed, mechanical analysis for the whole robot model was conducted. For
each analysis, a FBD was drawn for the rigid body as a whole and its individual components. Once the forces and
torques were summed about specific points on each linkage, the equations were organized in a matrix equation. The
equations were solved in a general terms so that variables can be changed to consider various designs and/or
situations of the robot.
Other calculations such as the hip and knee angles and the accelerations of each of the links were necessary in
completing these analyses. Ultimately, the results of this analysis expressed the torques in each joint as a function of
the reaction forces applied at the feet, the acceleration and velocities of the linkages, and the known parameters such
as the length, mass, and mass moment of inertia of the linkages.
The robot is supported by four legs. To understand what toques need to be generated by the actuators at the joints to
produce a desired force at the foot, a general model of the leg was analyzed and the torques present in the hip and
knee were related to the reaction force being exerted by the ground to the leg. A pin connection is assumed to be at
the hip where a reaction force is decomposed into its horizontal and vertical components, and , respectively.
The applied torques at the hip and knee are and , respectively, are due to the actuation of the joints applied by
the actuators. In order to express the hip and knee torques as a function of the reaction forces without any internal
reaction forces present, the leg model was separated into the thigh and shank components as seen in Figure 4 and
Figure 5. When the leg is analyzed individually its horizontal and vertical components at the knee appear and are
denoted by and respectively. The weight of the thigh linkage is , with a length of . The thigh is
orientated at an angle , also known as the hip angle which is measured from the horizontal. The weight of the
knee to foot linkage is , with a length of . The weights are a product of the link’s mass, for the thigh or
for the shank, and gravity, g, which are located at the center of mass. Each link also has a mass moment of inertia
defined as for the thigh and for the shank. The knee to foot leg linkage is orientated at an angle , which
is measured from the horizontal. is also known as the knee angle which is measured relative to the hip angle.
Once the mechanics of one leg was determined, analysis of a quadruped was conducted. From the modeling results
of the single leg, the torques in each joint was again solved for in terms of reaction forces applied at the
feet, , and , the kinematic variable of the legs and the known physical properties of the legs. The FBD of
the quadruped showing the feet forces and the position of the feet with respect to a fixed coordinate frame is shown
in Figure 6. The position of the center of the body and feet are defined as , and
,correspondingly, where the sub script denoted the leg number. The total weight of
the body is denoted as and is located at point , the center of mass. Similarly, to the leg analysis, there
are many internal forces present within the entire body. For each leg, similar forces and torques as seen in Figure 4
and Figure 5 are present. The joint parameters, reaction forces, and the forces exerted at the feet are assumed to be
different for each leg. The joint parameters can be calculated using the positions shown in Figure 6 and equations (3)
and (4). The reaction forces exerted at the feet are dependent on the motions of the quadruped. The FBD for the
body linkage separated from its legs can be seen in Figure 7. In Figure 7, the horizontal and vertical hip reaction
forces from each of the four legs are to and to respectively, the applied torques at the hips for each
leg are to , the weight of the body is located at the center of mass with a length , a mass moment of
inertia , and an orientation measure from the horizontal . Again the weight is defined as a product of the
mass, , and gravity g.
Figure 6. FBD of entire quadruped Figure 7. FBD of body link separated from its legs
With a rotary walking gait pattern chosen, a simple foot trajectory seen in Figure 8 was developed. The foot
trajectory can be defined in two phases consisting of four motions. The first three motions make up the first phase;
the swing phase where foot is picked up off the ground vertically, moved forward through the air and placed back
down on the ground. The last motion is defined in the dragging phase where the foot is actuated back to its original
position while applying a force into the ground propelling the robot body forward. All points defining the foot
trajectory are shown in Figure 8, where to , are the positions of the foot relative to the hip origin where the leg is
connected. In order to quantify the simulations, the length of the thigh and shank ( ) of each leg were chosen
as seen in Table 1.
11 inches
11 inches
(4,-20) inches
(4.-17.5) inches
(-1,-17.5) inches
(-1,-20) inches
In order to animate a robot to mimic the gait pattern, a model of the robot is created with simple bar linkage
connections in SolidWorks. The created frame represents the robot’s dimensions in the simplest form so that
motions can be observed, and is depicted in Figure 9. The files were imported into MATLAB through an STL file
where the geometries were plotted in 3D space as a series of polygons. Finally, the frame of the robot was built in its
initial static position with the use of homogenous translations and rotational matrices. With the defined foot
trajectory in Figure 8, the angles at each hip and knee joints were calculated using the inverse kinematic equations
(3)-(4) and stored for later analysis. Three-link Robot Animation
-5
Z
-10
-15
-20
5
-135
0 -140
-145
-5
-150
-10
-155
-15 -160
Y X
Figure 8. Foot trajectory used in animation Figure 9. MATLAB generated quadruped frame
When hip angles and foot positions were recorded for analysis only one cycle for one foot was recorded. Since the
foot trajectory is repeated once every phase per leg the position and the angles associated with the position will be
repeated once per phase. Therefore recording the position and angles for one cycle for one leg provides sufficient
information for analysis.
3. Results
From the FBD seen in Figure 4, three equations were derived by summing the horizontal and vertical forces and the
moments present in the body about the hip joint seen in equation (5), (6), and (7) where i is the leg number on the
model.
Thigh
(5)
(6)
̈ (7)
The same process was repeated for the FBD seen in Figure 5 and Figure 7 to obtain equations (8), (9), (10), and
(11), (12), (13) respectively. The moments present on the shank were taken about the knee joint and the moments
present on the body were taken about the left hip.
Shank
(8)
(9)
̈ ̈ (10)
Body
(11)
(12)
̈ (13)
In order for equations (5)-(13) to be useful, the accelerations of each body must be determined. To determine the
accelerations of each individual link, the center of the body was chosen as point relative to the inertial global
frame. The centers of each link were expressed in reference to the point by knowing the kinematics of the
robot body. With the positions of each link relative to the center of the body know, the equations for positions, were
differentiated twice to obtain the accelerations. The accelerations seen at the thigh and shank for each leg are similar
to each other. The only differences are the joint parameters which can be determined by using equation (3) and (4),
and knowing the foot positions seen in Figure 6. The horizontal and vertical accelerations for the thigh can be seen
in equations (14) and (15) respectively; the horizontal and vertical accelerations for the shank can be seen in
equations (16) and (17) respectively; the horizontal and vertical accelerations for the body can be seen in equations
(18) and (19) respectively.
̈ ( ̇ ̈ ) ̇ ̇ ̈ ̈ (14)
̈ ( ̇ ̈ ) ̇ ̇ ̈ ̈ (15)
̈ ( ̇ ̈ ) (16)
̈ ( ̇ ̈ ) (17)
̈ (18)
̈ (19)
By adapting equations (5)-(10) for four legs and equations (11)-(13), 27 equations are obtained that can be solved
simultaneously for the torques in each joint. By combining like terms and organizing the solutions into a matrix
equation, a simplified result of the mechanics analysis can be seen in equation (20).In the equation M is an 11x11
inertial matrix, C is an 11x11 centripetal coriolis matrix, G is an 11x1 vector of gravitational terms, f is an 8x1
vector of ground reactions, A is an 11x8 input transformation matrix, is an 8x1 vector of the joint torques, and q is
an 11x1 matrix of the state vector of the generalized coordinates which consists of the joint angles of each link and
the position of the body shown is Figure 6. The state vector is differentiated to obtain ̇ and once more to
obtain ̈ .
̈ ̇ ̇ (20)
Equation (20) allows for the calculation of the joint torques as long as the reaction forces and kinematics of the
robot are known, ie. f, , ̇ ,and ̈ . The forces and kinematics for this model can be determined based on the physical
geometry and dimensions of the quadruped robot, the desired gait pattern and foot motion trajectory chosen.
Additionally, if ̇ , and ̈ are set to zero, the equation then represents a static model of the quadruped robot. That is,
the torques necessary at each joint support the weight of the robot can be determined. Moreover, because equation
(20) represents a generalized mathematical model for a quadruped robot, different geometries of the robot can be
analyzed along with innovative dynamic motion and torque behaviors which can assist in the design of the physical
hardware platform.
After animating the walking gait pattern with the foot trajectory defined in Figure 8, the horizontal and vertical foot
positions with respect to the hip where the leg is connected were recorded and plotted against increments of time,
shown in Figure 10. The positions defined in Figure 8 are superimposed on Figure 10 to relate the foot trajectory
motion with the horizontal and vertical displacement of the foot and the corresponding hip and knee angles. In order
to keep the animation general and not restrict the motion profile to move at a predefined velocity the increment of
time was set to unity. Later, in the design, a proper velocity for the gait profile will be chosen so that proper
actuators for the robot can be selected.
Figure 10. Plots of horizontal (left) and vertical(right) foot position versus increments of time during a rotary
walking gait
From the values obtained from Figure 10, equations (3) and (4) were used to calculate the various hip and knee
angles during the gait animations. The hip and knee angle that occurred during the motion were then plotted with
respect to increments of time, as seen in Figure 11. Again the positions seen in Figure 8 are related to the plot in
Figure 11. These plots are useful in determining angular velocities and angular accelerations of the robot motion by
taking numerical derivate of the angular position. Knowing the kinematics of the robot for a particular motion is
crucial for the physical design of the robot to guarantee that the robot hardware will be able to achieve the desired
motion.
Figure 11. Plots of hip (left) and knee (right) angles versus increments of time during a rotary walking gait
4. Discussion and Conclusion
By using the data gathered from the animations along with the mathematical results described in equation (20), the
torques necessary for the specified gait pattern can be calculated and visualized. With the calculated torques several
design specifications such as actuation speeds, actuation position, and the dimensions of the robot can be
determined. With further interpretation of the results, the validity of the model to represent the actual robot system
can be determined. If the models provided can generate values that are accurate enough to achieve dynamic planar
motions on a physical robot system no further analysis will be required. However, if the results provide inaccurate
calculations, the model should be updated to better represent the physical system with more realistic parameters such
as; including the weight of actuators, not assuming that the weight is concentrated at the center of the link, and
implementing a more realistic contact model with the ground that is more realistic than the point contact model that
was used in this investigation. Additionally, if more general motion is desired that is beyond a simple planar motion,
a 3D analysis must also be conducted.
Overall, these results provide a great means of calculating torques necessary to achieve certain dynamic motion in
a quadruped robot. Since the results are general, the physical parameters in the equations can be altered to compare
and optimize various designs in terms of their capabilities and performance. Modeling offers an efficient
mathematical framework to analyze complex systems and to study key characteristics of the system that will aid
with the development of the physical design. The work presented in this research offers a mathematical model for
studying and visualizing planar motion of a quadruped robot. Additionally, it sets a foundation for more complex
analysis of legged robot platforms.
5. Acknowledgements
This research is supported by The National Science Foundation (NSF) for funding the Research Experience for
Undergrads (REU) program at the Milwaukee School of Engineering. Special thanks to Dr. Luis A. Rodriguez
(Advisor), Dr. Subha Kumpaty (Advisor), Dr. Debra Smith, Betty Albrecht, Tom Bray, and Pam Gorzalski and any
other REU staff that supported this research.
6. References
[1] Rong, Xuewen, Yibin Li, Jian Meng, and Bin Li. "Design for Several Hydraulic Parameters of a Quadruped
Robot." Applied Mathmatics & Information Sciences, 2014: 2465-2470.
[2] Tsujita, Katsuyoshi, toshiya Kobayashi, and tatsuya Masuda. "Feasibility study on Stability of Gait Patterns with
Changeable Body Stiffness Using Pneumatic Actuators in a Quadruped Robot." Advanced Robotics, 2009:
503-520.
[3] Heeseon Hwang, Toungil Youm. "Steady Crawl Gait Generation Algorithm for Quadruped Robot." Advanced
Robotics 22, 2008: 1539-1558.
[4] Wait, Keith W., and Michael Goldfarb. "A Pneumatically Actuated Quadrupedal Walking Robot." IEEE/ASME
Transactions on Mechatronics, 2014: 339-347.
[5] Bottcher, Sven. "Principles of Robot Locomotion."Proc. Human Robot Interaction Seminar, 2006.
[6] S. Vatau, V. Ciupe, C.Moldovan, I.Maniu. "Mechanical Design and System Control of Quadruped Robot."
Mechanika, 2010: 56-60.
[7] Bretl, Timothy, and Sanjay Lall. "Testing Static Equilibrium for Legged Robots." IEEE Transactions on
Robotics, 2008: 794-807.
[8] Remy, C.D., K.W. Buffington, and Siegwart R. "Stability Analysis of Passive Dynamic Walking of
Quadrupeds." The Internation Journal of Robotics Research, 2010: 1173-1185.
[9] Spong, Mark. Robot Dynamics and Control. Wiley, 1989.
[10] Kucuk, Serdar, and Zafer Bingul. "Robot Kinematics: Foward and Inverse Kinematics." Industrial Robotics:
Theory, Modelling and Control, 2006: 117-148.