You are on page 1of 14

Model-based control of a class of voltage-driven robot

manipulators with non-passive dynamics


q
Javier Moreno-Valenzuela
a,
, Ricardo Campa
b
, Vctor Santibez
b
a
Instituto Politcnico NacionalCITEDI, Ave. del Parque 1310, Mesa de Otay, Tijuana, BC, 22510, Mexico
b
Instituto Tecnolgico de La Laguna, Blvd. Revolucin y Cuauhtmoc, Torren, Coah., 27000, Mexico
a r t i c l e i n f o
Article history:
Received 30 August 2012
Received in revised form 19 June 2013
Accepted 19 June 2013
Available online 18 July 2013
a b s t r a c t
A class of voltage-driven robot manipulators is addressed in this paper. Such a class includes
those manipulators actuated by direct current (DC) motors with servo-ampliers in current
mode. For those robots, it is assumedthat the control inputs to the manipulator are the servo-
amplier input voltages, instead of the applied torques. And even though it is common to
consider that the applied torque in each joint is proportional to the servo-amplier input
voltage, in this paper it is assumed that the voltage-to-torque conversion constant is
unknown. Notwithstanding, the robot model parameters may still be computed using stan-
dardidenticationmethods. Animportant fact of theclass of robots consideredinthepresent
study is that the robot dynamics is not passive fromthe servo-amplier input voltage to the
joint velocity. The paper shows howthis drawback can be overcome by using a model-based
trajectory tracking controller, which makes the closed-loopsystempassive froman auxiliary
control input to a ltered error signal. To conrm the theoretical conclusions, real-time
experiments are carried out in a two-degree-of-freedom direct-drive manipulator. Two
known control strategies are compared with respect to the proposed controller. The success
of the implementations is basedonreal-time computing, whichensures that the access to I/O
ports and the computation of the control algorithms meet timing requirements accurately.
2013 Elsevier Ltd. All rights reserved.
1. Introduction
Robot manipulators are very useful in the industry, where achieving precise and repetitive tasks is required. Applications
of manipulators can be either simple or sophisticated; common tasks are painting, welding and assembling, to mention a
few. As a consequence, the study of motion controllers for manipulators has prompted the attention of researchers and con-
trol practitioners.
Electrical actuators (usually brushed or brushless DC motors) are found in the vast majority of robot manipulators. Some
textbooks, such[13], deal withthe modeling andcontrol of manipulators considering the electrical dynamics of the actuators.
An adaptive nonsingular fast terminal sliding mode control scheme consisting of an adaptive control termand a robust control
term for an electromechanical actuator was proposed in [4]. Fateh [5] proposed a robust controller which is designed taking
into account only the electrical dynamics of the robot. In [6] a fuzzy controller for a class of electrically driven manipulators
is given. More recently, the work by Orrante-Sakanassi et al. [7] dealt with the redesign of the controller introduced in [5].
In practice, however, electrical actuators are driven by servo ampliers working in current mode (also known as torque
mode). This means that the servo-amplier includes an inner current control loop which makes the motor output torque
0045-7906/$ - see front matter 2013 Elsevier Ltd. All rights reserved.
http://dx.doi.org/10.1016/j.compeleceng.2013.06.006
q
Reviews processed and approved for publication by Editor-in-Chief Dr. Manu Malek.

Corresponding author. Tel.: +52 664 6231344.


E-mail addresses: moreno@citedi.mx (J. Moreno-Valenzuela), recampa@itlalaguna.edu.mx (R. Campa), vsantiba@itlalaguna.edu.mx (V. Santibez).
Computers and Electrical Engineering 39 (2013) 20862099
Contents lists available at SciVerse ScienceDirect
Computers and Electrical Engineering
j our nal homepage: www. el sevi er. com/ l ocat e/ compel eceng
proportional to the servo-amplier input voltage. The proportionality constant is denoted in this paper as the voltage-to-tor-
que conversion constant. And it should be noticed that, as such current controller uses high gains, it is common in literature
to assume that the actual motor torque exactly tracks the desired one; thus, the whole electrical dynamics can be discarded
(see, e.g., [8,9]). Once the value of the voltage-to-torque constant is known, we can assume that the robot is controlled by a
torque signal instead of a voltage signal. In that case we talk about torque-controlled manipulators.
But, even though the voltage-to-torque constant can be measured by using torque meters, these devices are usually
expensive and not available everywhere. As pointed out in [10], the conventional approach to obtain a reliable estimation
of the voltage-to-torque constant is to apply known torque loads to the motor and measure the resulting motor voltage.
However, this can be complicated due to the effect of the static friction, since part of the applied torque is resisted by the
stiction mechanism not by the motor. A way to get around this was proposed by Chan [11]; he simply reformulated the dy-
namic model and put it in a regression form, so that the new set of unknown lumped parameters, including the torque-to-
voltage gain, can be computed using a standard identication method.
On the other hand, passive systems are dynamical systems in which the energy exchanged with the environment plays a
central role. A passive system cannot store more energy than that supplied to it from the outside, being the dissipated energy
the difference between the supplied and the stored energies. Passivity is a desired property of systems, which facilitates the
controller design and the stability analysis in closed-loop.
In the case of robot manipulators the passivity from the torque inputs to the joint velocities is a well-known property that
always holds, and has been useful in the design of passivity-based motion controllers. More information on this can be found
in the works of Slotine and Li [12], Sadegh and Horowitz [13], Berghuis and Nijmeijer [14], and the seminal textbook by Ort-
ega et al. [2]. For those torque-controlled manipulators, the aim of passive controllers is to make the closed-loop system keep
the passivity property exhibited by the robot in open-loop.
This paper deals with a class of voltage-driven robot manipulators for which (a) it is not possible to measure the voltage-
to-torque constant directly, although it can be estimated indirectly, embedded in the lumped parameters as suggested by
[11], and (b) such constant is not the same for each joint. The important issue with this class of manipulators is that its
dynamics losses the property of being passive from the control inputs to the velocity outputs.
The contribution of this work is twofold. First, after describing the properties of the class of manipulators studied, we
show how a model-based controller is employed to make the closed-loop system passive and asymptotically stable; of
course, this controller requires an estimation of the lumped parameters of the reformulated dynamic model. Secondly, in
order to evaluate the performance of the proposed controller, compared with two other well-known controllers, we show
the results of some experiments carried out on a two-degree-of-freedom direct-drive robotic arm, which belongs to the class
considered in this paper
By using a high-speed real-time computing platformit is possible to implement many of the control algorithms reported in
papers that only consider theoretical aspects of modeling and control. Moreover, developments in code generation allowusers
to create real-time code fromsimulation software such as Matlab and its toolboxes Simulink and Real-Time Windows Target. Let
us notice that the practical and pedagogical potential of these software tools have recognized (see, e.g., [1517]). The experi-
mental results showed in this paper were achieved using the interactive real-time framework provided by Matlab.
The present document is organized as follows. The robot model, its properties and the control goal are described in Sec-
tion 2. The analysis of the proposed controller is given in Section 3. Section 4 is devoted to show the real-time experimental
results, while some concluding observations are given in Section 5.
Notation: k
min
{A} and k
Max
{A} denote, respectively, the minimum and maximum eigenvalues of a symmetric positive def-
inite matrix Aq 2 R
nn
, for any q 2 R
n
. kxk

x
T
x
p
stands for the norm of a vector x 2 R
n
. kBk

k
Max
fB
T
Bg
_
stands for the
induced norm of a matrix B 2 R
mn
. The notation B
r
denotes the ball given by fx 2 R
n
: kxk 6 rg.
2. Robot model, properties and control goal
2.1. Robot dynamics
The dynamics of a serial-chain n-link robot manipulator, considering the presence of viscous and Coulomb friction at the
robot joints, can be written as [3,18]:
Mq

q Cq;
_
q
_
q gq F
v
_
q f
Cl

_
q s; 1
where q;
_
q, and

q 2 R
n
are the vectors of joint displacements, velocities and accelerations, respectively, Mq 2 R
nn
is the
symmetric positive-denite inertia matrix, Cq;
_
q
_
q 2 R
n
is the vector of centripetal and Coriolis torques, gq 2 R
n
is the vec-
tor of gravitational torques, F
v
2 R
nn
is a constant positive denite diagonal matrix that contains the viscous friction coef-
cients of each joint, f
Cl

_
q 2 R
n
is a vector of continuous and uniformly bounded functions, which approaches the behavior
of the Coulomb friction at each joint, and s 2 R
n
is the vector of joint torques supplied by the actuators.
Now, let us assume that the robot is actuated by electrical motors, which can be either brushed or brushless DC motors,
and servo-ampliers in current mode. It is a well-known fact that the torque delivered by a brushed DC motor can be con-
sidered proportional to the current in its windings; and, as explained in [8,9], the same occurs with a brushless DC motor.
Thus, the vector of joint torques s(t) in (1) can be written as
J. Moreno-Valenzuela et al. / Computers and Electrical Engineering 39 (2013) 20862099 2087
st K
m
i
m
t; 2
where i
m
2 R
n
is the vector of joint motor currents, and K
m
2 R
nn
is a diagonal matrix containing the current-to-torque con-
stants of each motor.
Now, in a motor with a servo-amplier in current mode it is assumed that a high-gain current controller ensures the
tracking of the desired current, which is considered proportional to the servo-amplier input voltage. In that case, the gen-
eralization for a robot gives
i
m
t K
sa
ut; 3
where K
sa
2 R
nn
is a diagonal matrix containing the servo-amplier gains, and u(t) is the vector of servo-amplier input
voltages. And combining (2) and (3), we get
st Kut; 4
with K = K
m
K
sa
, which is the voltage-to-torque constant. Eq. (4) imply that the motors with servo ampliers in current mode
can be modeled as ideal torque sources.
Finally, considering (4), the robot model (1) can be written as
Mq

q Cq;
_
q
_
q

gq F
v
_
q

f
Cl

_
q u; 5
where the bar symbol denotes left multiplication by K
1
of the corresponding vector or matrix in (1). The results introduced
in this paper consider that the positive denite matrix K 2 R
nn
is unknown.
2.2. Properties of the robot model
Although the equation of motion (5) is complex, it exhibits several fundamental properties which are exploited to facil-
itate control system design.
A well-known property of torque-driven manipulators is that its dynamic model is linear in the dynamic parameters.
Hence, the robot model (1) can be written as
Mq

q Cq;
_
q
_
q gq F
v
_
q f
Cl

_
q Xq;
_
q;

q# s; 6
for all q;
_
q;

q 2 R
n
, where # 2 R
p
is the vector of mechanical parameters and Xq;
_
q;

q 2 R
np
is the regression matrix. A sim-
ilar property holds for the robot model (5), which is stated below.
Property 1. For all q;
_
q;

q 2 R
n
we have that the robot model (5) can be parameterized as
Mq

q Cq;
_
q
_
q

gq F
v
_
q

f
Cl

_
q Yq;
_
q;

qh u; 7
where the elements of the vector h 2 R
r
are the lumped parameters of the robot, which include the voltage-to-torque conversion
constant, and Yq;
_
q;

q 2 R
nr
is the corresponding regression matrix.
Let us notice that the regression form (7) was employed by [11] for implementing identication methods to estimate the
vector h 2 R
r
in the case of robot manipulators with DC motors and drives in current mode.
In order to introduce some other properties of the robot model (5), the following assumption will be important.
Assumption 1. Matrix Mq in (5), dened as the product of matrices K
1
, and M(q) in (1), is positive denite, i.e.
x
T
Mqx x
T
K
1
Mqx > 0; 8x0: 8
If the symmetric part of the matrix Mq is used, the assumption (8) can be written as
x
T
Mqx x
T
M

qx > 0; 8x0: 9
where
M

q
1
2
Mq Mq
T
: 10
The inertia matrix Mq 2 R
nn
in model (1) is symmetric and positive denite. Assumption 1 states that for robot manip-
ulators not having the same voltage-to-torque constants in all joints the matrix Mq K
1
Mq will not be symmetric but
positive denite. In many of the practical situations that we have found, this statement is true. From a practical point of view,
Assumption 1 resembles a property more than an assumption.
Property 2. As matrix M

q, dened in (10), is symmetric and positive denite, by the RayleighRitz theorem we have
k
Max
fM

gkxk
2
Px
T
M

qx Pk
min
fM

gkxk
2
; 11
for all x 2 R
n
, with k
min
fM

g, and k
Max
fM

g positive constants.
2088 J. Moreno-Valenzuela et al. / Computers and Electrical Engineering 39 (2013) 20862099
Property 3. The time derivative of matrix Mq is
_
Mq Cq;
_
q C
a
q;
_
q
T
; 12
where
C
a
q;
_
q Cq;
_
qK
1
: 13
For the robot model (1) which has the torque s as the control input, the inertia and Coriolis matrix (obtained using Chris-
toffel symbols [2,3]) satisfy
x
T
1
2
_
Mq Cq;
_
q
_ _
x 0; 8 q;
_
q; x 2 R
n
: 14
The property (14) is crucial to show that the robot model (1) is passive from the input torque s to the joint velocity
_
q [2].
For the class of voltage-driven robots in (5), however, Property 3 gives
1
2
_
Mq Cq;
_
q
1
2
C
a
q;
_
q
T

1
2
Cq;
_
q; 15
with C
a
in (13), which is not skew-symmetric. In other words,
x
T
1
2
_
Mq Cq;
_
q
_ _
x0: 16
This implies that model (5) does not fulll the passivity property of model (1).
For example, in Section 4 we describe the model of an experimental arm which belongs to the class given by (5). For that
system, we have computed the matrix between brackets in (16), which results in
1
2
_
Mq Cq;
_
q
0 h
2

_
q
1
0:5
_
q
2
sinq
2

h
5

_
q
1
0:5
_
q
2
sinq
2
0
_ _
;
and having the parameters h
2
and h
5
different values, inequality (16) is veried.
2.3. Control goal
In order to introduce the control goal, the following will be assumed throughout this paper:
The robot joint displacements and velocities qt;
_
qt 2 R
n
are available for measurement.
The model structure of the manipulator can be written in the regression form (7) and the lumped parameters h are known
(presumably as a result of a parameter identication procedure).
Thus, the problem is to nd a model-based controller u 2 R
n
so that the limit
lim
t!1
~
qt
_
~
qt
_ _
0; 17
is assured, where
~
qt q
d
t qt; 18
_
~
qt
_
q
d
t
_
qt; 19
are respectively the position and velocity tracking errors, and q
d
t 2 R
n
denotes the desired joint position trajectory.
Throughout this paper we consider that the desired time-varying trajectory q
d
(t) is two times differentiable and is
bounded for all time t P0 in the sense
k
_
q
d
tk 6 l
1
; 20
k

q
d
tk 6 l
2
; 21
where l
1
and l
2
denote known positive constants.
3. Passivity-based controller
The aim of this section is to introduce a model-based control scheme which ensures the fulllment of the motion control
goal (17) for the class of voltage-driven manipulators with lumped parameters given by (5). The proposed controller is de-
signed by using the methodology of passive systems (that is why we call it passivity-based controller). As a result, the closed-
loop system is shown to be passive, even though the robot dynamics is not.
J. Moreno-Valenzuela et al. / Computers and Electrical Engineering 39 (2013) 20862099 2089
It is worth noting that the PD+ controller proposed in [19] exploits the passivity property of the torque manipulator (1).
Also, by using the robot model property (14), Slotine and Li [12] introduced a model-based controller s(t) for which passivity
is proven from an auxiliary control input vector s
0
(t) to a suitable ltered tracking error s(t). This fact is clearly explained in
[14]. In [20] the disturbance attenuation properties of the controller proposed in [12] are analyzed.
In analogy to the SlotineLi controller, the establishment of a passive relationship from an auxiliary control input u
0
(t) to
a ltered signal error s(t) is not directly derived for model (5). Some extra control terms should be added to achieve such a
passive relationship.
To show this, consider the following tracking controller
u Mq

q
r
Cq;
_
q
_
q

gq F
v
_
q

f
Cl

_
q Mq Mq Mq
T
_ _
1
K
v
Cq;
_
q C
a
q;
_
q
T
_ _
s u
0
_ _
; 22
where
_
q
r

_
q
d
K
~
q; 23
s
_
~
q K
~
q
_
q
r

_
q; 24
~
q denotes the tracking error in (19), matrix K is dened as
K K
1
v
K
p
; 25
with K
p
and K
v
being n n symmetric positive-denite matrices, and u
0
2 R
n
is an auxiliary signal to be dened later.
Notice that the matrix C
a
q;
_
q
T
is required to compute the voltage input u in (22). By assuming that the parameters in
h 2 R
r
(and hence all the terms of the model (5)) are known, then the matrix C
a
q;
_
q
T
can be computed using
C
a
q;
_
q
T

_
Mq Cq;
_
q;
which is a direct consequence of property (12).
By substituting the voltage input (22) in the robot model (5), and the denition of the ltered error s in (24), the equation
Mq Mq
T

_
s K
v
s C
a
q;
_
q
T
Cq;
_
qs u
0
0 26
is obtained.
In the remaining of this section we analyze the closed-loop Eq. (26) and show that
it is passive from u
0
to s;
the origin of the state space, assuming u
0
= 0, is globally asymptotically stable;
this is stated in the following propositions.
Proposition 1. The closed-loop system (26) is output strictly passive from u
0
to s.
Proof. The analysis is based in the following storage function
Vt; s s
T
Mqs; 27
which by Assumption 1 is positive denite and radially unbounded. The time derivative of V(t,s) is then computed as
_
Vt; s s
T
Mq Mq
T

_
s s
T
Cq;
_
q C
a
q;
_
q
T
s; 28
where
d
dt
x
T
Ax x
T
A
_
x
_
x
T
Ax x
T _
Ax;
and the robot model property (12) was used. By substituting (26) into (28),
_
Vt; s s
T
K
v
s s
T
u
0
: 29
Thus, integrating with respect to time, we obtain
Vt V0
_
t
0
st
T
K
v
stdt
_
t
0
st
T
u
0
tdt;
or
_
t
0
st
T
u
0
tdt
..
supplied energy
PVt V0
..
stored energy
k
min
fK
v
g
_
t
0
kstk
2
dt
..
dissipated energy
: 30
2090 J. Moreno-Valenzuela et al. / Computers and Electrical Engineering 39 (2013) 20862099
Finally, from (30), we conclude that the closed-loop system (26) denes a map that is strictly passive in the output s(t). h
The auxiliary signal u
0
(t) may contain external perturbations and the resulting dynamics introduced by the variation of
the robot parameters. Thus, the result stated in Proposition 1 means that the energy supplied by the signal u
0
is greater or
equal than the sum of the stored and the dissipated energies. If the amount of dissipated energy is increased, which can be
achieved by using a large value of K
v
, the stored energy V(t) will decrease in order to keep the energy balance.
Besides, by invoking the theory of systems with uniformly ultimately bounded signals [21] it is possible to show, by
assuming that the signal u
0
(t) models bounded voltage disturbances, that increasing the value of the minimum eigenvalue
of matrix K
v
reduces the ultimate bound of the Euclidean norm of the ltered tracking error ks(t)k.
On the other hand, note that with u
0
(t) = 0, for all t P0, the closed-loop system (26) can be written as
d
dt
~
q
_
~
q
_ _

_
~
q
Mq Mq
T

1
K
v

_
~
q K
~
q C
a
q;
_
q
T
Cq;
_
q
_
~
q K
~
q K
_
~
q
_ _
: 31
Provided that the matrix
K
v
C
a
q;
_
q
d

T
Cq;
_
q
d

is non-singular, the only equilibrium point of the system (31) is


~
q
T _
~
q
T

T
0.
Proposition 2. Assuming u
0
= 0, the state-space origin of the closed-loop system (31), with Kas in (25), is globally asymptotically
stable.
Proof. Inspired by the stability analysis of the closed-loop system using the SlotineLi controller given in [3], the Lyapunov
function candidate is
Vt;
~
q;
_
~
q
1
2

_
~
q K
~
q
T
Mq Mq
T

_
~
q K
~
q
~
q
T
K
p
~
q: 32
The function Vt;
~
q;
_
~
q in (32) is positive denite, radially unbounded and decrescent, and its time derivative along the
closed-loop system trajectories is given by
_
Vt;
~
q;
_
~
q
_
~
q
T
K
v
_
~
q
~
q
T
K
T
K
v
K
~
q;
where the denition of K in (25) and the robot model property (12) were used. Since Vt;
~
q;
_
~
q is globally positive denite
and radially unbounded and
_
Vt;
~
q;
_
~
q is globally negative denite, there are sufcient conditions [21] to prove the global uni-
form asymptotic stability of the state space origin of the closed-loop system (31). h
Since Proposition 2 claims the global asymptotic stability of the state space origin of the closed-loop system(26), the limit
~
qt
_
~
qt
_ _
! 0
as t ?1, is satised for all initial condition. Hence we are able to claim that with u
0
(t) = 0, the controller (22) ensures that
the control objective (17) is fullled.
4. Real-time experiments
A planar two-degree-of-freedom direct-drive arm has been built at the CITEDI-IPN Research Center. See Fig. 1 for a CAD
drawing and picture of this arm. The systemis composed by two DC Pittman motors with two servo ampliers fromAdvanced
Motion Controls operated in current-mode. A Sensoray 626 I/O board is used to read encoder signals and to transfer the con-
trol commands through the D/A channels. A PC with Windows XP running Matlab, Simulink and Real-Time Windows Target is
used to execute controllers in real-time with a 1 kHz sampling rate.
Fig. 2 shows a diagram of the arm, where the joint angular displacements q
1
and q
2
are dened.
As the robot is actuated by servo-ampliers in current mode, then the vector of torques is given by s = Kv, with K a 2 2
diagonal positive-denite matrix, and we can express the robot dynamics as in (5).
Specically, the elements of the experimental robot model are
Mq
h
1
2h
2
cosq
2
h
3
h
2
cosq
2

h
4
h
5
cosq
2
h
6
_ _
33
Cq;
_
q
h
2
sinq
2

_
q
2
h
2
sinq
2

_
q
1

_
q
2

h
5
sinq
2

_
q
1
0
_ _
34
J. Moreno-Valenzuela et al. / Computers and Electrical Engineering 39 (2013) 20862099 2091
F
v
diagfh
7
; h
8
g; 35

f
Cl

_
q

f
Cl1

_
q
1

h
9
tanh50
_
q
1
if
_
q
1
P0;
h
10
tanh50
_
q
1
if
_
q
1
< 0;
_

f
Cl2

_
q
2

h
11
tanh50
_
q
2
if
_
q
2
P0;
h
12
tanh50
_
q
2
if
_
q
2
< 0;
_
_

_
_

_
; 36

gq 0: 37
It is possible to show that matrix Mq is positive denite, although it is not symmetric. Also notice that, as the robot is mov-
ing in the horizontal plane, the vector of gravitational terms is null.
The lumped parameters h
i
2 R of the robot include the voltage-to-torque constants. By using an adequate estimation of
such parameters, model-based control laws as the one introduced in this paper, which considers the voltage as the robot
control input, can be implemented. Table 1 shows a numerical estimation of the parameters h
i
2 R for our robot, obtained
by using the weighted least-squares identication method in [22].
Fig. 1. Experimental robot manipulator.
Fig. 2. Kinematic diagram of the arm.
Table 1
Estimated parameters of the experimental robot arm; see Eqs. (33)(36) for reference.
Parameter Value Unit Parameter Value Unit
h
1
0.0480 V s
2
h
7
0.0070 V s
h
2
0.0037 V s
2
h
8
0.0071 V s
h
3
0.0033 V s
2
h
9
0.0571 V
h
4
0.0161 V s
2
h
10
0.0554 V
h
5
0.0220 V s
2
h
11
0.0067 V
h
6
0.0162 V s
2
h
12
0.0105 V
2092 J. Moreno-Valenzuela et al. / Computers and Electrical Engineering 39 (2013) 20862099
4.1. Computational issues
The practical implementation of a controller is achieved by real-time computation, which must capture, process and de-
liver data repeatedly, not necessarily fast, but meeting some timing requirements. Furthermore, the effective control of the
plant depends on the correct computation of the control law and reference input.
Matlab is a powerful software tool which includes several useful methods and functions for the control practitioners. The
use of analogue and digital input/output commands combined with Matlabs computation and visualization algorithms make
it ideal for integration into a research laboratory. Also high-level real-time programming tools included in Matlab enable
researchers to focus on control system design, implementation, and evaluation rather than on time-consuming, low-level
programming.
Concerning the implementation of real-time computer-aided proposed control system, the following remarks are in
order:
Matlab: This is the primary platform for our control system and can be described as an interactive environment for algo-
rithm design and testing with graphical user interface capabilities. This is the specic purpose software in which the pro-
posed control system is implemented.
Simulink: This is a Matlab toolbox for the construction and simulation of block models to represent system dynamics, con-
trol architectures, etc. This programming environment was used to develop the controller model.
Real-Time Workshop: This is a Matlab toolbox which enables real-time when using this tool the built model is compiled
and converted into an executable le to be run in real-time by the operating system.
Fig. 3 shows a block diagram of the computer system controlling the voltage-driven manipulator. In addition, Fig. 4 shows
a diagram of the used computing architecture. By utilizing the software package MATLAB, Simulink, Real Time Workshop,
the I/O board is interfaced between the Simulink stateow and the robotic system such that the physical system is controlled
successfully in the manner of hardware-in-the-loop simulation.
4.2. Joint velocity estimation
In practice, the position of the robot joints is obtained by means of encoder counts. Since the robot at hand is not
equipped with tachometers, joint velocity is estimated from joint position measurements by using a discrete lter. A prac-
tical and cheap solution is to approximate the joint velocity through the so-called dirty derivative
_
qkT
qkT qk 1T
T
;
where the product kT is the discrete time, k = 0, 1, . . . , is the integer time index, and T is the sampling period. Notwithstand-
ing, one generally nds that this approximation does not work well, especially as the sampling interval decreases, due to the
encoder measurement noise.
A more elaborated form of estimating the joint velocity has been used in the real-time experiments presented in this pa-
per. Consider the polynomials given in terms of the z-transform
Q
1
z
1
1 z
1
z
2
. . . z
p
1
;
Q
2
z
1
1 z
1
z
2
. . . z
p
2
;
where p
1
and p
2
are natural numbers. The averaged joint position of the last p
1
+ 1 samples is given by

qkT
Q
1
z
1

p
1
1
qkT:
Thus, the dirty derivative of

qkT is given by
_

qkT
1 z
1
T

qkT:
Fig. 3. Block diagram of the computer system controlling the voltage-driven manipulator.
J. Moreno-Valenzuela et al. / Computers and Electrical Engineering 39 (2013) 20862099 2093
Finally, the joint velocity can be approached by using the average of the last p
2
+ 1 samples of
_

qkT, i.e.,
_
qkT
Q
2
z
1

p
2
1
_

qkT Q
2
z
1

1 z
p
1
1
p
1
1p
2
1T
_ _
qkT: 38
The experiments presented in this paper have been carried out using the lter (38) with p
1
= p
2
= 4.
Although there are many methods to obtain acceptable estimations of the joint velocity
_
qt, see for example [23] an ref-
erences therein, we have considered that the one used in this paper, given by Eq. (38), is a good one. Nevertheless, perfor-
mance comparisons on its application to motion controllers have not been carried out yet.
4.3. Specication of the desired trajectory
Let us dene the vector y y
1
y
2

T
2 R
2
which represents the tip position of the robot in the Cartesian space (see Fig. 2),
which hereafter will be denoted as operational space. The operational space is related to the joint space by means of the di-
rect kinematics given by
y hq
l
1
sinq
1
l
2
sinq
1
q
2

l
1
cosq
1
l
2
cosq
1
q
2

_ _
: 39
In the experimental robot system, l
1
= 0.115 [m] and l
2
= 0.130 [m]. And taking the time derivative of (39) we get
_
y Jq
_
q
l
1
cosq
1
l
2
cosq
1
q
2
l
2
cosq
1
q
2

l
1
sinq
1
l
2
sinq
1
q
2
l
2
sinq
1
q
2

_ _
_
q
1
_
q
2
_ _
where J(q) is the Jacobian of the robot. Notice that J(q) is singular whenever q
2
= np
The desired task consists in tracing a circle of radius r
0
centered at coordinate y
c
y
c1
y
c2

T
2 R
2
of the operational space
at a given constant speed v
0
. To this end, the following desired operational space position trajectory y
d
(t) was specied to be
used during the experiments
y
d
t
y
c1
r
0
sin
v
0
r
0
t
_ _
y
c2
r
0
cos
v
0
r
0
t
_ _
_

_
_

_ m; 40
with parameters y
c1
= 0.15 [m], y
c2
= 0.0 [m], r
0
= 0.05 [m] and v
0
= 0.30 [m/s].
Since the present study is devoted to joint space tracking control, it is necessary to translate the desired operational space
trajectory y
d
(t) in (40) to a suitable desired joint space position trajectory q
d
(t). Such a conversion is usually done by using
the inverse kinematics map. Once obtained such a conversion, it is possible to implement a joint space controller so that
lim
t!1
q
d
t qt 0: 41
And, as far as the Jacobian J(q) be full rank, the limit (41) implies
lim
t!1
y
d
t yt 0:
In other words, joint space motion control may solve the operational space motion control if a proper desired joint space
trajectory q
d
(t) is used.
Concerning the experimental tests, it can be shown that the desired joint position trajectory q
d
that encodes the requested
task is given by
q
d
t h
1
y
d
t
p
2
tan
1 y
d2
t
y
d1
t
_ _
tan
1 l
2
St
l
1
l
2
Ct
_ _
cos
1
y
2
d1
ty
2
d2
tl
2
1
l
2
2
2l
1
l
2
_ _
_

_
_

_
; 42
where h
1
(y
d
) denotes the inverse kinematics as a function of the desired task space trajectory y
d
in (40),
Fig. 4. Block diagram of the computing system interacting with the manipulator.
2094 J. Moreno-Valenzuela et al. / Computers and Electrical Engineering 39 (2013) 20862099
Ct
y
2
d1
t y
2
d2
t l
2
1
l
2
2
2l
1
l
2
;
and
St

1
y
2
d1
t y
2
d2
t l
2
1
l
2
2
2l
1
l
2
_ _
2

_
:
The desired vectors of joint velocities and accelerations are given as
_
q
d
Jq
d

1
_
y
d1
_
y
d2
_ _
; 43

q
d

d
dt
Jq
d

1
_ _
_
y
d1
_
y
d2
_ _
Jq
d

1

y
d1

y
d2
_ _
: 44
Eqs. (43) and (44) remain valid as long as y
d
(t) is kept away from singular congurations.
In all the real-time experiments, the robot initial conditions were
q0 0:7330 1:6930
T
radians 42:0 97:0
T
degrees; 45
and
_
q0 0 0
T
: 46
4.4. Results
The results of the experimental evaluation are presented in this subsection. The performance of the model-based control-
ler (22), with u
0
(t) = 0, is compared with two joint space controllers:
the optimal PID tracking controller, and
the feedback linearization (inverse dynamics) controller.
The purpose of such comparison is to show the benet of compensating the model in the proposed controller. The result-
ing control voltages ut 2 R
2
and tracking errors
~
qt 2 R
2
for each one of the tested controllers are shown. The overall per-
formance of the experiments is analyzed in Section 4.4.
4.4.1. Optimal PID tracking controller
A convenient way to assess the tracking performance of model-based controllers is to achieve a comparison with respect
to a robust model-free controller. Thus, let us consider the H
1
optimal PID controller discussed in [24,25],
s K
1

1
c
2
I
_ _
_
~
q K

p
~
q K

i
_
t
0
~
qtdt
_ _
; 47
where K
1
; K

p
and K

i
are n n diagonal positive denite matrices satisfying
K

p
2
2K

i
> 0 48
and c
2
stands for the L
2
gain.
By using Eq. (4), the voltage input can be rewritten in the form
u K
d
_
~
q K
p
~
q K
i
_
t
0
~
qtdt; 49
with K
p
K
1
K
1

1
c
2
IK

p
, K
d
K
1
K
1

1
c
2
I
_ _
and K
i
K
1
K
1

1
c
2
I
_ _
K

i
being n n positive denite matrices satisfying
K
2
p
2K
i
> 0: 50
By following the results in [24,25], it is possible to show that the controller u in (49) guarantees that the error trajectories

~
qt
T
_
~
qt
T

T
2 R
2n
satisfy the denition of a uniformly ultimately bounded signal [21].
The following control gains have been used in the experiments
K
p
diagf5:0; 5:0g V=rad; 51
K
d
diagf0:5; 0:5g V s=rad; 52
and K
i
was chosen as
J. Moreno-Valenzuela et al. / Computers and Electrical Engineering 39 (2013) 20862099 2095
K
i
diagf9:375; 9:375g V=rad s; 53
which complies with guideline (50).
The results for this controller are shown in Fig. 5, where the time evolution of the applied voltages u
1
(t) and u
2
(t) is ob-
served in the left plots, while that for the tracking errors
~
q
1
t and
~
q
2
t is depicted in the right plots.
4.4.2. Feedback linearization controller
The feedback linearization controller, also denoted as inverse dynamics scheme, is written as
u Mq

q
d
K
df
_
~
q K
pf
_
~
q Cq;
_
q
_
q

gq F
v
_
q

f
Cl

_
q: 54
By substituting the control law (54) into the model of the electrically driven manipulator (5) the following closed-loop sys-
tem is obtained

~
q K
df
_
~
q K
pf
~
q 0:
The obtained closed-loop system is a second order linear time-invariant system. We decided to select the proportional and
derivative gains as
K
pf
diagf90:0; 90:0g
N
Kg rad
_ _
; 55
K
df
diagf18:97; 18:97g
N s
Kg rad
_ _
; 56
which produce a decoupled set of critically damped second order systems with natural frequency x
n

90
p
9:47 [rad/s].
The control gains (55) and (56) for the feedback linearization controller (54) were chosen so that the RMS (root mean
square) value of the applied voltage u(t) equal the one obtained for the passivity-based controller. This will be explained
in the discussion section below.
The results of implementing the feedback linearization scheme (54) are illustrated in Fig. 6. The applied voltages u
1
(t),
u
2
(t) are depicted in the left plots, while the tracking errors
~
q
1
t;
~
q
2
t are in the right plots.
4.4.3. Passivity-based controller
The proposed model-based controller (22) has been also implemented in a real-time experiment, with u
0
(t) = 0, for all
t P0.
The proportional and derivative control gains, K
p
and K
d
, respectively, used in controller (22) are the same that were used
for the robust PID controller (49) in Eqs. (51) and (52).
Fig. 7 shows in the left plots the time evolution of the applied voltages u
1
(t) and u
2
(t), while the right plots draw the track-
ing errors
~
q
1
t and
~
q
2
t.
4.5. Discussion
In this section we present some observations about the performance of the three tested controllers.
First, let us notice that the main motivation to include the linear model-free PID scheme (49) in the experimental tests is
to show the difference in the performance with respect to model-based compensation algorithms, like the feedback
Fig. 5. PID tracking controller. Time evolution of the control voltages u
1
(t), u
2
(t) (left), and the tracking errors ~ q
1
t; ~ q
2
t (right).
2096 J. Moreno-Valenzuela et al. / Computers and Electrical Engineering 39 (2013) 20862099
linearization scheme (54) and the passivity-based controller (22). As will be shown, more accuracy is obtained with model-
based schemes.
Different performance indexes have been computed for the obtained data. The results for each one are given in Table 2.
The time interval 5 6 t 6 10 has been selected to compute these indexes in order to avoid the transient effects.
The rst index corresponds to the peak joint tracking error dened as
Peak
~
q
i
t max
56t610
fj
~
q
i
jg; i 1; 2:
The best performance for this index is obtained by using the passivity-based controller (22). The improvement for joint 1 is
87.87% with respect to the PID control and 5.88% with respect to the feedback linearization controller. For joint 2, the
improvement is 38.71% with respect to the PID control and 57.78% with respect to the feedback linearization controller.
In order to average stochastic effects, the RMS (root mean square) value of trajectory tracking error vector
~
qt and the
servo amplier input voltage u(t) have been computed from t = 5 [s] to t = 10.0 [s] as
RMS
~
qt

1
5
_
t10
t5
k
~
qtk
2
dt

;
RMSut

1
5
_
t10
t5
kutk
2
dt

;
respectively.
The joint tracking error
~
qt reects how well the task is accomplished. By comparing the right plots of Figs. 57 it is clear
that the best tracking performance is obtained with the new passivity-based controller (22). A way to conrm that, is
Fig. 6. Feedback linearization controller. Time evolution of the control voltages u
1
(t), u
2
(t) (left), and the tracking errors ~ q
1
t; ~ q
2
t (right).
Fig. 7. Passivity-based controller. Time evolution of the control voltages u
1
(t), u
2
(t) (left), and the tracking errors ~ q
1
t; ~ q
2
t (right).
J. Moreno-Valenzuela et al. / Computers and Electrical Engineering 39 (2013) 20862099 2097
observing that the lowest value for the RMS
~
qt performance index was obtained for the passivity-based controller. The
percentage of improvement is 76.18% with respect to the PID controller and 33.08% with respect to the feedback lineariza-
tion controller.
Notice that the feedback linearization controller (54) presented a quite similar energetic consumption than the passivity-
based controller (22) since RMS[u(t)] is almost identical for both schemes. In fact, this was the criterion for selecting the
gains (55) and (56) in the feedback linearization controller (54). With respect to the RMS[u(t)] criterion, the worst perfor-
mance is obtained with the PID controller (49) since it presented the maximum numerical value.
The performance of each of the tested controllers is also seen by comparing the trace of the arm tip in the operational
space, i.e., y
2
(t) versus y
1
(t). Fig. 8 describes such a comparison, where once again the advantage of the proposed controller
(22) over the robust PID (49) and the feedback linearization controller (54) is conrmed.
As other performance index, we have used the contouring error, dened as
e
C
t r
0

y
c1
y
1
t
2
y
c2
y
2
t
2
_
;
where y
c1
= 0.15 [m] and y
c2
= 0.0 [m] are the circle center coordinates and r
0
= 0.05 [m] is the corresponding radius. The con-
touring error for both controllers is shown in the right plot of Fig. 8. Table 2 shows the obtained values of
Peake
C
t max
56t610
fje
C
tjg;
which represents the maximum absolute value of the contouring error e
C
(t). It is remarkable to see that by means of the new
controller (22) the performance was enhanced by 85.82% with respect to the PID controller (49) and 31.94% with respect to
the feedback linearization controller (54).
Figs. 57 reveal the existence of a steady-state oscillatory behavior in the real-time experiments. This is due to several
factors such as small mismatch in the parameters h
i
of the robot model, discrete controller implementation, and high fre-
quency PWM switching of the servo ampliers.
Table 2
Performance of the three controllers.
Index Unit PID Feedback linearization Passivity-based
Peak~ q
1
t (rad) 0.132 0.017 0.016
Peak~ q
2
t (rad) 0.031 0.045 0.019
RMS[~ qt] (rad) 0.0739 0.0263 0.0176
RMS[u(t)] (V) 0.7044 0.5876 0.5879
Peak[e
C
(t)] (m) 0.0201 0.0031 0.00211
Fig. 8. Performance comparison. The path of the arm tip in Cartesian space (left plot) and the contouring error e
C
(t) (right plot) for the three tested
controllers.
2098 J. Moreno-Valenzuela et al. / Computers and Electrical Engineering 39 (2013) 20862099
5. Conclusions and further research
In this paper, the motion control of a class of voltage-driven robot manipulators was addressed. This class includes robots
actuated by brushed or brushless motors with drives congured in current mode. The model of such robots is characterized
by a set of lumped parameters embedding the voltage-to-torque constant of each actuator, which is assumed to be unknown.
The application of a model-based controller was proposed. By following the same procedure for the design of passive con-
trollers, the new scheme gives as a result a closed-loop system which is both passive and with solutions asymptotically con-
verging to the desired trajectory.
Our study was complemented with real-time experiments on a two-degree-of-freedom direct-drive robot, which belongs
to the class of manipulators studied. The robust PID and the feedback linearization control schemes were tested together
with the proposed controlled. The experimental results were obtained by using a PC, a data acquisition board and Matlab,
since it combines a high-level language and interactive environment for visualization, and real-time programming. Our main
conclusion is that the proposed passivity-based control seems to be the best alternative to achieve motion control.
Further work includes the construction of 3 degrees-of-freedom robotic armand the evaluation of the proposed controller
in such a prototype. Since the closed-loop stability of the proposed controller is not constrained by the number of degrees of
freedom, a good tracking performance is expected also in these experiments.
Other directions for further research consist in extending the ideas proposed to the problem of velocity control of manip-
ulators [26] and analysis of PID controllers [27].
Acknowledgement
This work was supported by SIP-IPN, DGEST, PROMEP, and CONACYT Projects 176587, 60230 and 134534, Mexico.
References
[1] Lewis FL, Abdallah CT, Dawson DM. Control of robot manipulators. New York: Macmillan; 1993.
[2] Ortega R, Loria A, Sira-Ramirez HH, Nicklasson PJ. Passivity-based control of Euler-Lagrange systems. Springer-Verlag; 1998.
[3] Kelly R, Santibez V, Loria A. Control of robot manipulators in joint space. Springer-Verlag; 2005.
[4] Li H, Dou L, Su Z. Adaptive nonsingular fast terminal sliding mode control for electromechanical actuator. Int J Syst Sci 2013;44(4):40115.
[5] Fateh MM. On the voltage-based control of robot manipulators. Int J Control Autom Syst 2008;6(5):70212.
[6] Fateh MM. Robust fuzzy control of electrical manipulators. J Intell Rob Syst 2010;60:41534.
[7] Orrante-Sakanassi J, Santibez V, Moreno-Valenzuela J. Stability analysis of a voltage-based controller for robot manipulators. Int J Adv Rob Syst
2013;10:119.
[8] Krause PC, Wasynczuk O, Sudhoff SD. Analysis of electric machinery and drive systems. Wiley-IEEE Press; 2002.
[9] Campa R, Torres E, Salas F, Santibez V. On modelling and parameter estimation of brushless DC servoactuators for position control tasks. In:
Proceedings of the 17th IFAC world congress. Seoul, Korea; July 2008.
[10] Corke PI. In situ measurement of motor electrical constants. Robotica 1996;14(4):4336.
[11] Chan SP. An efcient algorithm for identication of robot parameters including drive characteristics. J Intell Rob Syst 2001;32(3):291305.
[12] Slotine JJE, Li W. Adaptive manipulator control: a case study. IEEE Trans Autom Control 1988;11(3):9951003.
[13] Sadegh N, Horowitz R. Stability and robustness analysis of a class of adaptive controllers for robotic manipulators. Int J Rob Res 1990;9(3):7492.
[14] Berghuis H, Nijmeijer H. A passivity approach to controller-observer design for robots. IEEE Trans Rob Autom 1993;9(6):74054.
[15] Dixon WE, Dawson DM, Costic BT, de Queiroz MS. A MATLAB-based control systems laboratory experience for undergraduate students: toward
standardization and shared resources. IEEE Trans Educ 2002;45(3):21826.
[16] Sharp JS, Glover PM, Moseley W. Computer based learning in an undergraduate physics laboratory: interfacing and instrument control using matlab.
Eur J Phys 2007;28(3).
[17] Meza-Snchez M, Moreno-Valenzuela J. On real-time velocity control of DC motors by using computer-aided control system design. Revista Tcnica de
la Facultad de Ingenieria Universidad del Zulia 2011;34(1):7785.
[18] Sciavicco L, Siciliano B. Modelling and control of robot manipulators. Springer; 2000.
[19] Paden B, Panja R. Globally asymptotically stable PD+ controller for robot manipulators. Int J Control 1988;7(6):1697712.
[20] Sherpen J, Ortega R. On nonlinear control of Euler-Lagrange systems: disturbances attenuation properties. Syst Control Lett 1997;30:4956.
[21] Khalil H. Nonlinear systems. Upper Saddle River: Prentice-Hall; 2002.
[22] Gautier M, Poignet P. Extended Kalman ltering and weighted least squares dynamic identication of robot. Control Eng Pract 2001;9(12):136172.
[23] Merry RJE, van de Molengraft MJG, Steinbuch M. Velocity and acceleration estimation for optical incremental encoders. Mechatronics 2010;20:206.
[24] Choi Y, Chung WK, Suh IH. Performance and H
1
optimality of PID trajectory tracking controller for lagrangian systems. IEEE Trans Rob Autom
2001;17(6):85769.
[25] Choi Y. PID state estimator for lagrangian systems. IET Control Theory Appl 2007;1(4):93745.
[26] Moreno J, Kelly R. Velocity control of robot manipulators: analysis and experiments. Int J Control 2003;76(14):14207.
[27] Santibanez V, Camarillo K, Moreno-Valenzuela J, Campa R. A practical PID regulator with bounded torques for robot manipulators. Int J Control Autom
Syst 2010;8(3):54455.
Javier Moreno-Valenzuela received the Ph.D. degree in automatic control from CICESE, Ensenada, Mexico, in 2002. From 2004 to 2005, he was a Post-
doctoral Fellow with the Universit de Lige, Belgium. He is currently with the Instituto Politcnico NacionalCITEDI, Tijuana, Mexico. His main research
interests are control of electromechanical systems, robotics, and real-time systems.
Ricardo Campa received the M.S. degree in electrical engineering from the Instituto Tecnolgico de la Laguna, Torren, in 1998, and the Ph.D. degree in
electronics and telecommunications from CICESE, Ensenada, Mexico, in 2005. He is currently a Research Professor with the Instituto Tecnolgico de la
Laguna. His research interests include modeling and control of robotic systems, path planning, and real-time applications.
Vctor Santibez received the Ph.D. degree from CICESE, Ensenada, Mexico, in 1997. He is currently with Instituto Tecnolgico de la Laguna. He has
coauthored the books Control of Robot Manipulators (in spanish, R. Kelly, Prentice Hall, 2003) and Control of Robot Manipulators in Joint Space (R. Kelly
and A. Loria, Springer, 2005). His research interests are robot control, nonlinear systems control, fuzzy control and adaptive control.
J. Moreno-Valenzuela et al. / Computers and Electrical Engineering 39 (2013) 20862099 2099