HUMANOID
REALISTIC SIMULATOR
The Servomotor Joint Modeling
Jos
´
e L. Lima
1
, Jos
´
e A. Gonc¸alves
1
, Paulo G. Costa
2
and A. Paulo Moreira
2
1
Polytechnic Institute of Braganc¸a, Braganc¸a, Portugal
2
Faculty of Engineering of University of Porto, Porto, Portugal
Keywords:
Humanoid, Servomotor, Modeling, Simulation.
Abstract:
This paper presents a humanoid servomotor model that can be used in simulations. Once simulation is a
tool that reduces the software production time, it was developed a realistic simulator that own the humanoid
features. Based on a real platform, the simulator is validated when compared with the reality.
1 INTRODUCTION
Recent research in biped robots has resulted in a vari-
ety of prototypes that resemble their biological coun-
terparts. Legged robots have several advantages, they
can move in rugged terrains, they have the ability
to choose optional landing points, and two legged
robots are more suitable to move in human environ-
ment (Suzuki and Ohnishi, 2006).
The simulator should capture the essential charac-
teristics of the real system. In this paper, the servo-
motor model that powers the real humanoid joints is
addressed. The model of a Dynamixel AX-12 servo-
motor and its characteristics are found by an iterative
method based on a realistic simulator, the SimTwo
(Costa, 2009).
There are several simulators with humanoid simu-
lation capability, like Simspark, Webots, MURoSimF,
Microsoft Robotics Studio, YARP: Yet Another
Robot Platform (Wang et al., 2006) and OpenHRP3
(Ope, 2009), meanwhile, the SimTwo, as a generic
simulator, allows to simulate different types of robots
and allows the access to the low level behaviour, such
as dynamical model, friction model and servomotor
model in a way that can be mapped to the real robot,
with a minimal overhead. This simulator deals with
robot dynamics and how it reacts for several controller
strategies and styles. Using a realistic simulator can
be the key for reducing the development time of robot
control, localization and navigation software. It is not
an easy task to develop such simulator due to the in-
herent complexity of building realistic models for the
robot, its sensors and actuators and their interaction
with the world (Browning and Tryzelaar, 2003).
The purpose of developing such simulator is to
produce a personalized and versatile tool that will
allow the development and validation of the robot’s
software thereby reducing considerably the develop-
ment time.
The paper is organized as follows: Initially, the
real robot (which is the basis of the simulator) and its
main control architecture are presented. Then, sec-
tion 3 presents the developed simulator where the ser-
vomotor model was developed. Further, section 4
presents the validation of the simulator by compar-
ing its results with the real robot. Finally, section 5
rounds up with the conclusions and future work.
2 REAL HUMANOID
There are several humanoid robots kits available. The
commercially available Bioloid robot kit, from Robo-
tis, is the basis of the used humanoid robot and the
overview of the proposed biped robot is shown in Fig-
ure 1.
Figure
1: Real humanoid robot (from Bioloid).
396
Lima J., Gonçalves J., Costa P. and Moreira A. (2009).
HUMANOID REALISTIC SIMULATOR - The Servomotor Joint Modeling.
In Proceedings of the 6th International Conference on Informatics in Control, Automation and Robotics - Robotics and Automation, pages 396-400
DOI: 10.5220/0002183903960400
Copyright
c
SciTePress
The servo motors are connected to the central pro-
cessing unit through a serial 1Mbps network. Next
subsection presents the physical robot in which the
developed humanoid simulator was based.
2.1 Main Architecture
The presented humanoid robot is driven by 19 servo
motors (AX-12): six per leg, three in each arm and
one in the head. Three orthogonal servos set up the
3DOF (degree of freedom) hip joint. Two orthogonal
servos form the 2DOF ankle joint. One servo drives
the head (a vision camera holder). The shoulder is
based on two orthogonal servos allowing a 2DOF
joint and elbow has one servo allowing 1DOF. The to-
tal weight of the robot (without camera and on board
computer) is about 2 kg and its height is 38 cm.
Figure 2: Real humanoid robot control application.
To control the real humanoid robot a high level
application (presented in Figure 2) was developed.
This application is independent from the simulator, al-
though it allows to acquire and share some real robot
data with simulator.
3 SIMULATION MODEL
Designing the robot’s behaviour without real hard-
ware is possible due to a physics-based simulator im-
plementation. The physics engine is the key to make
simulation useful in terms of high performance robot
control (Browning and Tryzelaar, 2003). The dy-
namic behaviour of robot (or multiple robots) is com-
puted by the ODE (Open Dynamics Engine), a free
library for simulating rigid body dynamics.
3.1 Simulator Architecture
The simulator architecture is based on the real hu-
manoid robot. The body masses and dimensions are
used to build a humanoid simulator similar to the real
one. The communication architecture in real robot
brings some limitations to control loop such as lag
time. The developed simulator enhances these prop-
erties. The same architecture levels of the real robot
are implemented in the simulator. At the lowest level,
the servo motor model includes the control loop, just
like the real servomotors. At the highest level, some
predefined joint states are created based on several
methods presented on literature (Kajita et al., 2006)
and (Zhang et al., 2008). At the middle level, an op-
timized trajectory controller that allows to minimize
the energy consumption is introduced as presented in
Figure 3 (Lima et al., 2008b).
Figure 3: Simulator main architecture.
Next subsections describe the servomotor model
that is used in the simulator where the electrical, fric-
tion and controller models are presented.
3.2 DC Motor Model
The servomotor can be modeled by a DC motor
model, presented in Figure 4, where U
a
is the con-
verter output, R
a
is the equivalent resistor, L
a
is the
equivalent inductance and e is the back em f voltage
as expressed by equation 1 (Conceic¸
˘
ao et al., 2006).
Figure 4: DC motor electric model.
U
a
= e + R
a
i
a
+ L
a
i
a
t
(1)
The motor can deliver a T
S
torque and its load
has a J moment of inertia that will be presented by
the physical model ODE. Current i
a
can be related
with developed torque T
D
through equation 2 and the
back em f voltage can be related with angular speed
HUMANOID REALISTIC SIMULATOR - The Servomotor Joint Modeling
397
through equation 3, where K
s
is a motor parameter
that can be found by an experimental setup as pre-
sented in subsection 3.3 (Bishop, 2002).
T
D
(t) = K
s
i(t) (2)
e(t) = K
s
ω(t) (3)
In fact, the real developed torque (useful) that will
be applied to the load (T
S
) is the motor torque sub-
tracted by the friction torque (T
F
) as presented in
equation 4. The friction torque is discussed in sub-
section 3.5.
T
S
= T
D
T
F
(4)
3.3 DC Motor Model Measurements
It was used the AX-12 servomotor from Dynamixel as
the base of the humanoid simulator articulations. The
R
a
and L
a
values can be directly measured (R
a
=8
and L
a
= 5 mH). The K
s
motor parameter can be found
by an indirect estimation. For several angular speeds,
it can be measured the em f voltage while motor is
open circuit.
Figure 5 shows the graphical data of the K
s
line
and its trend line. The average value of 13 measures
for K
s
(line slope) is about 0.006810 V.s/rad.
Figure 5: K
s
value for DC motor model.
3.4 DC Motor Nonlinearities
In a way to better model the real system, where vari-
ables cannot assume all values, there must be some
limits applied to some quantities. The first one, is the
voltage applied to the supply terminals U
a
. This volt-
age is limited by the batteries voltage. Further, current
i is limited by the drive electronics once it is related
to the torque through equation 2 (torque limit is pro-
grammed in the real servomotor). Current gradient is
also implicitly limited by the presence of L
a
. Figure 6
shows the block diagram computed by the simulator.
There is also a internal gradient limitation to ensure
some numerical stability specially when the integra-
tion step period is significantly slower than electric
dynamic.
Figure 6: Servomotor model block diagram computation.
3.5 Friction Model
The friction model has two terms: the static and dy-
namic friction as presented in equation 5.
T
F
= F
c
sign(ω) +B
v
ω (5)
The first one can be modeled as the sign function
(with Fc constant) and the second one can be modeled
as a linear function with slope Bv.
The sum of this two components (T
F
), the final
friction model, is shown in figure 7.
Figure 7: Servomotor model nonlinearities.
Figure 8 shows the friction model implemented in the
servomotor model.
Figure 8: Servomotor model with friction model.
The F
c
and B
v
constants are found using simulator
scanning several possible values minimizing the error
with the real system during an arm fall from 90 to 0
degrees. The error surface function can be minimized.
ICINCO 2009 - 6th International Conference on Informatics in Control, Automation and Robotics
398
As result, Bv=0.01278 N.m.s/rad and
Fc=0.0000171 N.m where found as the best
values. These constants allow the simulator to follow
reality very closely as presented in figure 9 where
an arm falls from 45, 90 and 135 degrees for both
robots.
Figure 9: Real robot and simulator friction comparison.
3.6 Low-level Controller
The low level controller resembles the closed loop
controller in the real robot implemented by the servo-
motor manufacturer. This controller accepts, from the
higher level, the angle and angular speed references
that define a trajectory. The controller type present
in the Dynamixel isn’t specified. However, there are
some possible models for the controller, such as PID
or state feedback. Considering a state feedback con-
troller and assuming K
i
θ
the position error gain and
K
i
ω
the speed error gain for each i joint, the equation
6 defines the servomotor input (U
a
) that keeps the de-
sired reference conditions for each i joint. The output
torque is computed by the physic model as presented
in Figure 10.
U
i
a
(t) = K
i
θ
(θ
i
re f
(t) θ
i
(t)) + K
i
ω
(ω
i
re f
(t) ω
i
(t))
(6)
Figure 10: Low level controller.
The position error and the speed error gains can be
computed resorting to a least squares approach. Hav-
ing the real robot arm step response (from 0 to 90 de-
grees), it is possible to scan several gains and to de-
termine the quadratic error between the real servo and
the humanoid simulator joint for each solution. The
one that fulfill the lowest quadratic error is the chosen
gains to the controller. Figure 11 shows the quadratic
error for the several solutions.
Figure 11: Quadratic error for real and simulator servomo-
tor.
The lowest quadratic error (0.66 degrees
2
) occurs
for K
i
θ
equals 30 and for K
i
ω
equals -1.2. These gains
allow to obtain the step response very close to the real
servo. Figure 12 shows both step responses.
Figure 12: Real and simulator servomotor step response.
3.7 Servomotor Model
With the previous results, it is possible to create the
servomotor model including the DC motor, the fric-
tion and the controller models (with its nonlinearities)
that will represent the real servo motor in the simula-
tor. The final model is presented in figure 13.
Figure 13: Simulator servomotor model.
HUMANOID REALISTIC SIMULATOR - The Servomotor Joint Modeling
399
4 SIMULATOR VALIDATION
To validate the humanoid simulator model it is re-
quired to implement the same control signal to both
robots and to analyze the behaviors. Predefined tra-
jectory states, that allow robot to walk, are based on
the Zero Moment Point (ZMP) method. Figure 14
shows the sequence during walk movements for both
robots (real at left and simulator at right). It is pos-
sible to observe that both robots exhibit very similar
behaviours.
Figure 14: Real and simulator robots walking with the same
predefined gaits.
Figure 15: Real and simulator robots knee angles during a
walk movement.
With this walking movement, it can be acquired
all joint angles for both robots. Figure 15 shows
a knee angle for real and simulated robots, in a
walk movement, that shows simulator behaves as real
robot. Moreover, the power consumption compari-
son between real and simulated robot is presented in
(Lima et al., 2008a).
5 CONCLUSIONS AND FUTURE
WORK
A simulator that allows a humanoid robot simula-
tion capability is addressed and validated. The joints
that emulate the real articulations are based on a re-
alistic servomotor model. The proposed servomotor
model was implemented in the developed simulator,
SimTwo. This simulator is based in a real platform.
The friction model and closed loop controller gains
are found based on the real robot behaviour. It al-
lows to search the optimal values for friction and con-
troller gains based on a heuristic approach. The vali-
dation with the real humanoid robot allows to confirm
the proposed servomotor model. As future work, the
simulator can be useful to find several parameters that
optimize a desired condition such as energy consump-
tion in the walk movement and further applied to the
real robot.
REFERENCES
(2009). Open architecture humanoid robotics platform.
http:// www.openrtp.jp/openhrp3/en/index.html.
Bishop, R. (2002). The Mechatronics Handbook. CRC
Press, New York.
Browning, B. and Tryzelaar, E. (2003). Ubersim: A realis-
tic simulation engine for robotsoccer. In Proceedings
of Autonomous Agents and Multi-Agent Systems, AA-
MAS’03.
Conceic¸
˘
ao, A., Moreira, A., and Costa, P. (2006). Dynamic
parameters identification of an omni-directional mo-
bile robot.
Costa, P. (2009). Simtwo webpage. http://www.fe.up.pt/
˜paco/wiki/.
Kajita, S., Morisawa, M., Harada, K., Kaneko, K., Kane-
hiro, F., Fujiwara, K., and Hirukawa, H. (2006).
Biped walking pattern generator allowing auxiliary
zmp control. In Proceedings of IEEE/RSJ Interna-
tional Conference on Intelligent Robots and Systems,
pages 2994–2999.
Lima, J., Gonc¸alves, J., Costa, P., and Moreira, A. (2008a).
Realistic behaviour simulation of a humanoid robot.
In 8th Conference on Autonomous Robot Systems and
Competitions.
Lima, J., Gonc¸alves, J., Costa, P., and Moreira, A. (2008b).
Realistic humanoid robot simulation with an opti-
mized controller: a power consumption minimiza-
tion approach. In 11th. International Conference on
Climbing and Walking Robots, pages 1242–1248.
Suzuki, T. and Ohnishi, K. (2006). Trajectory planning of
biped robot with two kinds of inverted pendulums. In
Proceedings of 12th International Power Electronics
and Motion Control Conference, pages 396–401.
Wang, X., Lu, T., and Zhang, P. (2006). Yarp: Yet another
robot platform. International Journal of Advanced
Robotic Systems.
Zhang, L., Zhou, C., and Xiong, R. (2008). A lie
group formulation for realtime zmp detection using
force/torque sensor. In Proceedings of the 11th Inter-
national Conference on Climbing and Walking Robots
and the Support Technologies for Mobile Machines,
pages 1250–1257.
ICINCO 2009 - 6th International Conference on Informatics in Control, Automation and Robotics
400