Content uploaded by Ashkan Jasour
Author content
All content in this area was uploaded by Ashkan Jasour on Feb 28, 2014
Content may be subject to copyright.
Adaptive NeuroNMPC Control of Redundant Robotic
Manipulators for Path Tracking and Obstacle Avoidance
Ashkan M. Z. Jasour, Mohammad Farrokhi
Department of Electrical Engineering
Center of Excellence for Power System Automation and Operation
IRAN University of Science and Technology, TEHRAN, IRAN
amjasour@ee.iust.ac.ir, farrokhi@iust.ac.ir
Abstract—This paper presents a nonlinear model predictive control (NMPC) method with adaptive neuromodelling for redundant
robotic manipulators. Using the NMPC, the endeffector of the robot tracks a predefined geometry path in the Cartesian space
without colliding with obstacles in the workspace and at the same time avoiding singular configurations of the robot. Furthermore,
using the neural network for the model prediction, no knowledge about system parameters is necessary; hence, yielding robustness
against changes in parameters of the system. Numerical results for a 4DOF redundant spatial manipulator actuated by DC
servomotors shows effectiveness of the proposed method.
Keywords—Robotic Manipulator, Path Tracking, Obstacle Avoidance, NMPC, Neural Networks.
1. Introduction
One of the major challenges in robotic manipulators is the path tracking and the obstacle avoidance. The main reason for
development of manipulator robots is to replace human in doing long and repetitive operations and unhealthy tasks. In this case,
robots must be capable to operate effectively in complex environments. In particular, these robots are needed to track a
predefined path in such a way that no collision with obstacles in the environment occurs. High degrees of freedom for redundant
manipulators lead to infinite number of possible joint positions for the same pose of the endeffector. Hence, for a given end
effector path in the Cartesian space, the robot can track it in many different configurations; among these, the collision free and
singular free tracking must be selected. Finding feasible path for joints of redundant manipulators for a given endeffector path
is called the redundancy resolution [1]. Redundancy resolution and obstacle avoidance are considered in papers. Using the
gradient projection technique, redundancy and obstacle avoidance can be solved [2]. In taskpriority redundancy resolution
technique, the tasks are performed with the order of priority. Path tracking is given the first priority and obstacle avoidance or
singularity avoidance is given the second priority [3, 4]. This technique yields locally optimal solution that is suitable for real
time redundancy control but not for large number of tasks. The generalized inverse Jacobin and extended Jacobin techniques,
which are used for redundancy solution, are time consuming [5][7]. Optimization techniques, which minimize the cost function
subject to constraints, like the endeffector path tracking and obstacle avoidance, are not suitable for online applications [4].
In this paper, a Nonlinear Model Predictive Control (NMPC) method is presented for redundancy resolution considering
obstacles and singularities avoidance. Although the Model Predictive Control (MPC) is not a new control method, works related
to manipulator robots using MPC is limited. Most of the related works are on the joint space control and on the endeffector
coordinating. The linear MPC is used in [8][10] and NMPC is used in [11][14] for joint space control of manipulators.
Using NMPC, the input voltages of DC servomotors of joints are obtained in such a way that the endeffector of the
redundant manipulator tracks a given path in the Cartesian space considering obstacles and singularities avoidance.
When the robot dynamic are uncertain, adaptive control laws must be used in order to tackle this problem. Adaptive control
methods using neural network are implemented in literatures for controlling highly uncertain and nonlinear systems [15, 16]. In
this paper, neural networks are used as a prediction system in NMPC. Using neural network no knowledge about system
parameters is necessary. Moreover, system robustness against changes in parameters is obtained.
This paper is organized as follows: Section 2 presents nonlinear dynamic of a 4DOF spatial redundant manipulator including
the actuators dynamic. Section 3 describes the nonlinear model predictive control method. Section 4 explains how to obtain
prediction model of the robot using neural networks. Section 5 implements the NMPC for the path tracking and obstacles
avoidance for a 4DOF manipulator. Simulation results are presented in section 6. Conclusions are drawn in Section 7.
2. Manipulator Robot Dynamic
Schematic diagram of a 4DOF spatial redundant manipulator robot is shown in Fig. 1. Table I gives DenavitHartenberg
parameters of this robot [17]. Then, the position of the endeffector in the Cartesian space can be calculated in terms of joint
angles as fallows:
1423432322
1423432322
423432322
()
()
clclclc
x
yslclclc
z
lslsls
++
=++
++
(1)
The dynamic model of the robot manipulator can be obtained using the Lagrangian method as [17, 18]
Fig. 1 Schematic of a 4DOF spatial manipulator
()(,)()()
+++=
M
θθ Cθθ DθGθτ
&&&& (2)
where
n
R
∈θis the angular position of joints, ()
nn
R
×
∈Mθis the symmetric and positive definite inertia matrix, (,)
n
R
∈Cθθ
& is
the centrifugal and coriolis force vector, ()
n
R
∈Gθis the gravity vector, ()
n
R
∈Dθ
&is the vector for joints friction of the links,
n
R
∈τ is the torque vector of joints, and n is the degree of freedom, which is equivalent to four for the robot considered in this
paper. The above matrix and vectors are given in Appendix.
Friction for joint i is defined as [18]
()sgn()
vidi
DiDD
θθ
=+
&&
(3)
where
v
D
and
d
D
are coefficients of the viscous and dynamic frictions, respectively.
The dynamics of the armaturecontrolled DC servomotors that drive the links can be expressed in the form [18]
eTa
emmmmm
taaaaEm
=
=++
=++
τKi
τJθBθτ
VRiLiK
θ
&&&
&&
(4)
where
n
e
R
∈τis the vector of electromagnetic torque,
nn
T
R
×
∈K is the diagonal matrix of the motor torque constant,
n
a
R
∈
i is
the vector of armature currents,
nn
m
R
×
∈J is the diagonal matrix of the moment inertia,
nn
m
R
×
∈Bis the diagonal matrix of
torsional damping coefficients, ,,
n
mmm
R
∈θθθ
&&& denote the vectors of motor shaft positions, velocities and accelerations,
respectively,
n
m
R
∈τis the vector of load torque,
n
t
R
∈V is the vector of armature input voltages,
nn
a
R
×
∈Ris the diagonal
matrix of armature resistances,
nn
a
R
×
∈Lis the diagonal matrix of armature inductances, and
nn
E
R
×
∈K is the diagonal matrix
of the back electromotive force (EMF) coefficients.
Since dynamic equations of DC servomotors are considered here, the relationship between the robot joint and the motorshaft
can be represented as
m
m
==
τ
θ
R
θτ
(5)
where
nn
R
×
∈
r
is a diagonal positive definite matrix representing the gear ratios for n joints. Since armature inductances are
small and negligible, Eq. (4) can be expressed as [15]
()
ETT
mmmmmt
aa
+++=
KKK
J
θBθτ V
RR
&&&
(6)
Using Eq. (5) to eliminate θm and τm in Eq. (6) and then substituting for τ using Eq. (2), the governed equation of nlink
robot manipulator including actuator dynamics can be obtained as
22
()()()
ETT
mmt
aa
++++++=
KKRK
JRM
θBθRCGDV
RR
&&& (7)
According to Eq. (7), the armature input voltages are considering as control efforts, respectively. The detailed parameters of
the robot manipulator and DC servomotors are given as Table II and Table III, respectively.
TABLE I
DENAVITHARTENBERG PARAMETERS OF THE ROBOT IN FIG.1
Link α
o
a d
θ
o
1 90 0 0 1
θ
2 0 2
l 0 2
θ
3 0 3
l 0 3
θ
4 0 4
l 0 4
θ
TABLE II
MANIPULATOR ROBOT PARAMETERS
Link 1 2 3 4
l (m) 1 0.5 0.4 0.3
m (kg) 1 0.5 0.4 0.3
TABLE III
DC SERVO MOTORS PARAMETERS
Motor 1 2 3 4
R
a
6.51 6.51 6.51 6.51
KE 0.7 0.7 0.7 0.7
KT 0.5 0.5 0.5 0.5
Bm 4
1064
−
×
4
1064
−
×
4
1064
−
×
4
1064
−
×
J
m
0.2 0.2 0.2 0.2
R 1:100 1:100 1:10 1:10
V
t
24 24 24 24
3. Model Predictive Control
Unlike in classical control methods, where the control actions are taken based on the past outputs of the system, the MPC is a
modelbased optimal controller, which uses predictions of the system output to calculate the control law [19, 20].
Based on measurements obtained at every sampling time k, the controller predicts the output of the system over prediction
horizon NP in the future using the model of the system and determines the input over the control horizon NC≤ NP such that a
predefined cost function is minimized.
To incorporate feedbacks, only the first member of the obtained input is applied to the system until the next sampling time
[19]. Using the new measurement at the next sampling time, the whole procedure of prediction and optimization is repeated.
From the theoretical point of view, the MPC algorithm can be expressed as
))(min(arg kJu u
= (8)
such that the following conditions are satisfied:
maxmin
maxmin
0
)(
)1(
))1(()1(
))(),(()1(
,))())(
)(
ukjkuu
xkjkxx
kjkxhkjky
kjkukjkxfkjkx
NjkNkukjku
xkkx
d
d
Cu
≤+≤ ≤++≤ ++=++ ++=++ ≥+=+
=
(9)
where j∈[0 , NP1], x and u are states and input of the system, x0 is the initial condition, and fd and hd are the model of the
system used for prediction. The notation a(mn) indicates the value of a at instant m predicted at instant n. The intervals [xmin ,
xmax] and [umin , umax] stand for the lower and the upper bound of states and input, respectively. The cost function J is defined in
terms of the predicted and the desired output of the system over the prediction horizon. MPC schemes that are based on
nonlinear model or consider nonquadratic cost function and nonlinear constrains on inputs and states are called Nonlinear MPC
[19].
The optimization problem (8) must be solved at each sampling time k, yielding a sequence of optimal control laws
as **
{(),,(1)}.
u
kKkN+−uuK For optimization, the sequential quadratic programming method is used in this paper [21].
4. Prediction Model Using Artificial Neural Network
As it was explained, a model of the system is needed for prediction in MPC. In this paper, a Multilayer Perceptron (MLP) is
used for modeling nonlinear dynamics of the robot in MPC. Using the neural network for model prediction, no prior knowledge
about system parameters is needed. The prediction is based on the input voltage, angular position, and angular velocity of joints
at the current sampling time. The output of the predictor is the angular position of the joint at the next sampling time. Using this
structure, a onestepahead prediction of joints position can be obtained. However, in the predictive control, multistep
predictions over the prediction horizon are needed. By applying onestep prediction recursively, multistep prediction can be
achieved. In this case, the outputs of the neural network are considered as inputs for the next step. Using the neural network
recursively, high accuracy of onestepahead prediction is needed. For this reason, one neural network is implemented for every
link of the robot to predict the position of every joint angle. The structure of the employed MLP is shows in Fig. 2. Transfer
functions for the hidden and the output layer neurons are of tangent hyperbolic and linear types, respectively. The inputs are the
angular position and the angular velocity of joints, and the input voltage of the ith joint at the current sampling time
[vti(k), θ1(k), θ2(k), θ3(k), θ4(k), ∆θ1(k), ∆θ2(k), ∆θ3(k), ∆θ4(k)] and the output is θi(k+1), which refers to the ith joint position at
the next sampling time.
Fig. 2 Neural Network structure
The neural networks are trained offline first using the data gathered form the system. The main reason for this is that the
weights of NNs are initialized with random numbers; hence, without any offline training the robot might collide with obstacles.
The offline training does not need to be very accurate; just a rough familiarity of NNs with the robot behavior to avoid large
initial tracking error and/or collision with obstacles suffices. It should be noted that the online training of NNs can cope with all
changes in robot parameters, including the masse of links, the friction of joints and parameters of servomotors.
)(kVi
t
)(
1kθ
)(
2kθ
)(
3kθ
)(
4kθ
)(
1kθ∆
)(
2kθ∆
)(
3kθ∆
)(
4kθ∆
)1( +k
i
θ
5. Path Tracking and Obstacle Avoidance Using NMPC
The purpose of the path tracking and obstacle avoidance of robot manipulators is to obtain a control law such that the end
effector tracks a given geometry path in the Cartesian space and at the same time to avoid collision of robot links with obstacles.
To achieve this purpose, the NMPC method is implemented in this paper. Block diagram of NMPC is shown in Fig. 3.
According to the NMPC algorithm, an appropriate cost function must be determined in order to obtain the control law.
For path tracking, the cost function must be directly related to the tracking error. On the other hand, the cost function for the
obstacles avoidance must be inversely related to the distance between the obstacle and the manipulator. Hence, in this paper, the
cost function is defined as
maxmin
max minminmax
1
()
()
,
POOPP
PPOO
N
j
DDkjkD
Dkjk
DDD
D
JQR
eeee
ee ee
=
−+−
+
− −
−−
=+
− −
∑ (10)
where DP is the Euclidean distance between the endeffector and the geometry path in the Cartesian space, DO is the minimum
Euclidean distance between the manipulator and obstacles; moreover, Q ≥0 and R≥ 0 are the weighting parameters.
Fig. 3 Block diagram of NMPC
Notation a(mn) in (10) indicates the value of a at the instant m predicted at instant n. The intervals [DPmin, DPmax] and [DOmin,
DOmax] are the range of variations for DP and DO, respectively. According to the length of manipulator links, the value for DPmin
and DPmax is 0 and 2.4 meter and the value of DOmin and DOmax is 0 and 1.2 meter, respectively. Using the cost function in (10),
the two terms for the path tracking and the obstacle avoidance are normalized to [0 1].
Next, constrains in the optimization problem is considered. Considering the fact that the amplitude of input voltages is
limited, one of the constrains is
maxmin ttt VVV ≤≤ (12)
where Vt min and Vt max stand for the lower and the upper bound of input voltages for servo DC motors, respectively (24 V
and 24 V as Table III shows).
Next, considering the fact that in singular configurations the joint velocities are infinite, the following constrain must be
taken into account:
maxmin θθθ &&& ≤≤ (13)
where min
θ
&and max
θ
&are the lower and the upper bound of the joints velocities (which are 400 and 400 deg./s, considering the
robot and motors parameters), respectively.
By incorporating constrains (12) and (13) into the cost function, the optimization problem can be solved.
6. Simulation Results
The simulated results of the proposed control method are presented in this section. A rectangular path in the Cartesian space
along with obstacles inside the work space is considered. The developed neural network for every link consists of three layers: 9
neurons in the input layer, 10 neurons in the hidden layer, and 1 neuron in the output layer.
Simulation results for the case of sampling time of 0.5 sec., Np = 5, Nc = 1, without any changes in robot parameters are
shown in Figs. 4 to 9.
Figs. 10 and 11 show the results when an additional 20 kg mass at
25sec.
t
=
is added to the fourth link of the robot.
Future
Reference
Future Obstacles
Position Predictions
Nonlinear
Dynamic
Model
Past
Control
+

Cost
Function
Constraint
Future
Sensory
Data
z
Input
Torques
Optimization
NMPC
Manipulator
Robot
(x,y,z)
Fig. 4 Desired and actual endeffector path
Fig. 5 Positions of manipulator joints
Fig. 6 Velocities of manipulator joints
Fig. 7 Input voltages of servo DC motors
Fig. 8 Path following of a 4DOF manipulator with four obstacles on the workspace
Fig. 9 The path tracking of Fig.8 from a different view angle
Fig. 10 Endeffector path tracking with sudden changes in the mass of link 4
Fig. 11 Positions of manipulator joints
The optimization problem is solved using the SQP method. For more information refer to the MATLAB routine “fmincon”.
Fig. 12 shows the simulation runtime for the proposed method. As this figure shows, the runtime is mostly less than the
sampling time. However, it should be noted that: 1) the simulations are performed in MATLAB software, which requires more
time than a lower level computer program such as C++, 2) in simulations, solving the robot equations also incurs some
computational time, which is not required in practice, 3) some aspects of computations, such training of NNs, can be processed
in parallel. Hence, the simulation run time can be much less than Fig. 12. Therefore, in practice, the proposed method can be
successfully applied to robot manipulators using conventional digital computers.
7. Conclusion
In this paper, to achieve path tracking and obstacle avoidance for robotic manipulators, the NMPC method was employed.
For this reason, two terms were introduced in the cost function, one for the tracking problem and one for the obstacle avoidance
and by introducing constrains to joints velocities, singularities were avoided. Moreover, neural networks are employed for
adaptive model prediction that can cope with changes in system parameters. The main advantage of NNs is that no prior
knowledge about nonlinear equations of the robot or its parameters is needed.
References
[1] E. S. Conkur, “Path planning using potential fields for highly redundant manipulators”, Robotics and Autonomous Systems, Vol. 52, pp. 209–228, 2005.
[2] J. L. Chen, J. S. Liu, W. C. Lee, T. C. Liang, “Online multicriteria based collisionfree posture generation of redundant manipulator in constrained
workspace“, Robotica, Vol. 20, pp. 625–636, 2002.
[3] P. Chiacchio, S. Chiaverini, L. Sciavicco, B. Siciliano, ”Closedloop inverse kinematics schemes for constrained redundant manipulators with task
space augmentation and task priority strategy“, International Journal of Robotics Research, Vol. 10, pp. 410426, 1991.
[4] Y. Nakamuro, Advanced Robotics Redundancy and Optimization, AddisonWesley Publishing Co., 1991.
[5] C. L. Boddy and J. D. Taylor,”Whole arm reactive collision avoidance control of kinematically redundant manipulators“, in Proc. of IEEE Int. Conf. on
Robotics and Automation, Vol. 3, pp. 382–387, Atlanta, Georgia, USA, May, 1993.
[6] T. Yoshikawa, ”Analysis and control of robot manipulators with redundancy”, in Proc. of the First International Symposium in Robotic Research , MIT
Press, Cambridge, MA, pp. 439446, 1993.
[7] C. Chevallereau, W. Khalil, ”A new method for the solution of the inverse kinematics of redundant robots“, in Proc. of IEEE Int. Conf. on Robotics and
Automation, pp. 37–42, Washington, DC, USA, April, 1988.
[8] F. Valle, F. Tadeo, T. Alvarez, ”Predictive control of robotic manipulators”, in Proc. of IEEE Int. Conf. on Control Applications, pp. 203208, Glasgow,
Scotland, UK, September, 2002.
[9] J. K. Kim, M. C. Han,”Adaptive robust optimal predictive control of robot manipulators”, 30th Annual Conf. of the IEEE Industrial Electronics Society,
Busan, Korea, November, 2004.
[10] A. Vivas, V. Mosquera, ”Predictive functional control of a PUMA robot”, ACSE Conf., CICC, Cairo, Egypt, December, 2005.
[11] W. Wroblewski, ”Implementation of a model predictive control algorithm for a 6dof Manipulatorsimulation results”, Fourth Int. Workshop on Robot
Motion and Control, Puszczykowo, Poland, June, 2004.
[12] R. Hedjar, R. Toumi, P. Boucher, D. Dumur, S. Tebbani, ”Finite horizon non linear predictive control with integral action of rigid link manipulators”,
IEEE Conference on Control Applications, Int. J. Appl. Math. Comput. Sci., Vol. 15, No. 4, pp. 101113, août, Canada, 2005.
[13] Ph. Poignet, M. Gautier, “Nonlinear model predictive control of a robot manipulator”, in Proc. of 6th Int. Workshop on Advanced Motion Control, pp.
401406, Nagoya,Japan, March, 2000.
[14] R. Hedjar, R. Toumi, P. Boucher, D. Dumur, “Feedback nonlinear predictive control of rigid link robot manipulators”, American Control Conference,
Anchorage, Alaska, May, 2002.
[15] S.Huang, K.KiongTan, T.Heng Lee, A.S.Putra, “Adaptive Control of Mechanical Systems Using Neural Networks”, IEEE Transactions on Systems,
Man, and Cybernetics, Part C: Applications and Reviews, Vol 37, Issue 5 ,pp. 897  903,Sept, 2007.
[16] Hayakawa, T. Haddad, W.M. Hovakimyan, N. , “Neural Network Adaptive Control for a Class of Nonlinear Uncertain Dynamical Systems With
Asymptotic Stability Guarantees”, IEEE Transactions on Neural Networks, Vol 19 , Issue: 1 , pp. 80  89 ,Jan. 2008
[17] F. L. Lewis, C. T. Abdallah, and D. N. Dawson, Control of Robot Manipulators Theory and Practice, Marcel Dekker Inc, 2004.
[18] T. Yoshikawa, Foundation of Robotics, Analysis and Control, the MIT Press, Boston, USA, 1990.
[19] F. Allgower, R. Findeisen, Z. K. Nagy, “Nonlinear model predictive control: from theory to application”, J. Chin. Inst. Chem. Engrs, Vol. 35, No. 3, pp.
299315, 2004.
[20] R. Findeisen, L. Imsland, F. Allgower, and B. A. Foss, “State and output feedback nonlinear model predictive control: an overview”, European journal
of control, Vol. 9, pp. 190206, 2003.
[21] R. Fletcher, Practical methods of optimization, John Wiley & Sons, 1987.
[22] Li.Xin Wang, A Course in Fuzzy System and Control, PrenticeHall International, Inc, 1997.
APPENDIX
223242233432344234
33432344234
44234
(1,1)0
111
(1,2)mmmcm mc mc
222
11
(3,1) m m c mc
22
1
(4,1) m c(A.1)
2
G
Gglglglglglgl
Gglglgl
Ggl
=
=+++++
=++
=
()
2222222222
11223242233432344234
332432232443234234422342
222222
2232334342444424344
33
2111
(1,1)cc
3333
2 ccc
111
(2,2) c
333
Mmlmlmlmlmlmlmlc
mllmllmllccmllc
Mmlmlmlmlmlmlmllmll
mll
=++++++
++++
=+++++++
+
( )
24233
222
3343444344
2
44
222
3343442443324233
4434
2
442444434
2c
11
(3,3) c
33
1
(4,4) 31111
(2,3)(3,2) c
3232
c
111
(2,4)(4,2) c
232
(3,4)(4,3)
mll
Mmlmlmlmll
Mml
MMmlmlmllmlmllmll
mll
MMmllmlmll
MM
+
=+++
=
==+++++
+
==++
==
2
444344
11
c
32
(1,2)(2,1)0
(1,3)(3,1)0(A.2)
(1,4)(4,1)0
mlmll
MM
MM
MM
+
==
==
==
22222
222232223232233322334322334222
12
2
42322344322334442223444223344
22
32323233223343223343223
11
ss s s ss
33
(1,1) 1
 2s s s s
3
1
scs s 2s
3
mlmlmllmlmlml
Cmllmllmllml
mllmlmlmll
θθ
=
+
&&
243422334
13
2
424234244223344
2
4432342344223424422334414
2222
22223222323223332233432233
2
4222
c s
1
 scs
31
ss s
3
11111
s ssss
62262
1
(2,1)s
2
mll
mllml
mllcmllcml
mlmlmllmlml
Cml
θθ
θθ
+
++++
=++
&&
&&
( )
( ) ( )
2
4232234432233442422341
2
44223344
22
32334323344344434424
3323432323434434
11
s ss
22
1
S
6
11
ss s s
22
s 2s s
(3,1
mllmllmll
ml
mllmllmllmll
mllmllmll
C
θ
θθθθ
θθθθ
++
+
+++
++
&
&&&&
&&&&
( )
22
33223233223343223342323244322334
2
1
2
442234244223344
22
32334323243442443444
434
1111
s ss ss
2622
)
11
ss
26
11
s s ss
22

mllcmlmlmllcmll
mllcml
mllmllmllmll
mlls
θ
θθθθ
++++
=
++
++++
+
&
&&&&
()
()
434
222
44323423442234244223344144342
2
44343443434
1111
(4,1) s sc s s
2262
1
s s(A.3)
2
Cmllcmllmlmll
mllmll
θθ
θθ
θθθ
=+++
++
&&
&&
&&&
where, li and mi (i=1,…,4) are the length and mass of the ith link, respectively, θi and i
θ
&are the angular position and the angular
velocity of the ith joint, respectively, and ci = cos(θi ), si = sin(θi ), cij = cos(θi +θj), sij = sin(θi +θj), and so forth.