2012
International Symposium on Power Electronics,
Electrical Drives, Automation and Motion
      One Step Ahead Nonlinear Predictive Control of
             Two Links Robot Manipulators
                            K. Bdirina*, R. Hajer**, M. Boucherit*, D. Djoudi*** and D. Rabehi***
                               * National polytechnic school (ENP), Hacen Badi avenue El Harrach, (Algeria)
              ** Department of Computer Engineering, King Saud University P.O. Box 51178 Riyadh, (Kingdom of Saudi Arabia)
                          *** Electronics Departements, Djelfa University, P.O. Box 3117 Djelfa 17000, (Algeria)
       Abstract--Rigid link manipulators have attracted more                            II. NONLINEAR PREDICTIVE CONTROL
    and more attention from robot control theorists and robot
    users because of its various potential advantages. However,
                                                                                Consider the nonlinear system
    their nonlinear dynamics present a challenging control
    problem, since traditional linear control approaches do not                               ݔሶ ൌ ݂ሺݔሻ  σ
                                                                                                           ୀଵ ݃ ሺݔሻݑ ሺݐሻ
                                                                                             ൜                             ሺͳሻ
    easily apply. For a while, the difficulty was mitigated by the                                    ݕሺݐሻ ൌ ݄ሺݔሻ
    fact that manipulators were highly geared, thereby strongly
    reducing the interactive dynamic effects between links. In                   Where x (t) is the vector of state variables, u (t) is the
    this work a fixed one step ahead nonlinear predictive                    control vector and y (t) is the output vector, the functions
    control has been applied to compute time optimal solutions
                                                                             f, g, h are assumed to be real and have continuous partial
    for a two link manipulator operating in the horizontal plane
    subject to control angle positions, where the solution is
                                                                             derivatives.
    obtained by minimizing a cost function.              Tracking                The classical goal in control is to impose the output of
    performances of the controller are investigated via some                 the controlled system to achieve a setpoint as quickly as
    simulations.                                                             possible [6]. In the predictive context, the predicted
                                                                             tracking error is minimized over a finite horizon. The
       Index Terms-- One step ahead predictive control, cost                 model prediction of a nonlinear system is a continuous
    function,          robot    manipulator,    nonlinear   system,          function that allows us to calculate the system output at
    optimization                                                             future time (t + h), where h> 0 is the prediction horizon.
                                                                             The predictive model output based on the Taylor series
                                                                             expansion is given by,
                           I. INTRODUCTION
       The concept of predictive control is the creation of an                      ݕሺ ݐ ݄ሻ ൌ ݕሺݐሻ  ܸ௬ ሺݔǡ ݄ሻ  ሺ݄ሻܹሺݔሻݑሺʹሻ
    anticipatory effect, this control structure, developed for
    linear systems, has experienced a real boom as advanced                  Where
    control technology since the 80s [1]. This growth is due
    to its robustness vis-à-vis the structured or unstructured                  ܸ௬ ሺݔǡ ݄ሻ ൌ ሺݒଵ ሺݔǡ ݄ሻ     ݒଶ ሺݔǡ ݄ሻ ǥ Ǥ ݒ ሺݔǡ ݄ሻሻ் ;
    uncertainties. In general, the dynamic model of physical
    processes is nonlinear and the establishment of predictive               With
    control laws for these processes requires minimizing the
    cost function online, which is an operation very complex                                             ݄ଶ ଶ               ݄  
                                                                             ݒ ሺݔǡ ݄ሻ ൌ ݄ܮ ݄ ሺݔሻ        ܮ ݄ ሺݔሻ   ڮ      ݄ ܮሺݔሻ
    [2]. To avoid this problem of online optimization,                                                   ʹǨ                 ݎ Ǩ  
    nonlinear predictive control several off-line have been
    proposed [3]–[4]–[5]. The prediction of tracking discard                              ݄భ ݄మ       ݄
    at one step is obtained using Taylor expansion of order ri               ሺ݄ሻ ൌ ݀݅ܽ݃ ൬ ǡ        ǡǥǡ      ൰
                                                                                          ݎଵ Ǩ ݎଶ Ǩ     ݎ Ǩ
    of the output signal and reference, where ri is the relative
    degree of the ith system output, the solution of the                     ܹሺݔሻ ൌ ሺݓଵ      ݓଶ    ǥ      ݓ ሻ் ;
    minimization a quadratic criterion at one step establishes
    the control law.                                                         With
                                                                                             ିଵ                       ିଵ
       In this paper a fixed one step ahead nonlinear                        ݓ ሺݔሻ ൌ ൫ܮଵ ܮ ݄ ሺݔሻ       ǥ   ܮ ܮ ݄ ሺݔሻ൯
    predictive control with input constraints is applied to two
    link manipulator system. After presenting the principle of               A. Reference Trajectory
    a fixed one step ahead predictive control, a mathematical
                                                                                For the output y (t) of nonlinear system (1) can follow
    model is developed for our nonlinear system to validate
                                                                             the reference trajectory yref (t), it must be r differentiable,
    and test the proposed control, simulations were conducted
                                                                             where r is the relative degree of the output y (t). This
    through which the control performance is evaluated.
                                                                             condition ensures the controllability of the output along
                                                                             the setpoint yref (t) [7].
978-1-4673-1301-8/12/$31.00 ©2012 IEEE
                                                                      1219
    Therefore we can apply the Taylor expansion of order                                   III. ONE STEP AHEAD PREDICTIVE CONTROL OF RIGID
r to the reference signal:                                                                                         MANIPULATOR
                                                                                            The robot system is described by nonlinear model
                 ݕ ሺ ݐ ݄ሻ ൌ ݕ ሺݐሻ  ݀ሺݐǡ ݄ሻሺ͵ሻ                       [8]–[9], with q being the joint angles,  being the joint
                                                                                         inputs, rigid robot manipulator can be generally
                                                                                         expressed as
Where
    ݀ሺݐǡ ݄ሻ ൌ ሺ݀ଵ ሺݐǡ ݄ሻ           ݀ଶ ሺݐǡ ݄ሻ    ǥ       ݀ ሺݐǡ ݄ሻሻ்                       ݍሷ ሺݐሻ ൌ െܯሺݍሻିଵ ൫ܥሺݍǡ ݍሶ ሻݍሶ  ܩሺݍሻ൯  ܯሺݍሻିଵ ߬ሺݐሻ                  (8)
                                   మ                    ೝ    ሺ ሻ
With: ݀ ሺݐǡ ݄ሻ ൌ ݄ݕሶ              ݕሷ    ڮ          ݕ
                                                                  
                                                                                            Optimal control is applied to the robot manipulator to
                                   ଶǨ                   
                                                                                         resolve the problem of tracking a reference trajectory for
                                                                                         the joint positions, the reference trajectory is a specified
   In case this is not checked, a trajectory model of
                                                                                         by continuous function         qref(t) for t [t0, tf]. The
exponential type is used to generate the reference
                                                                                         problem consists to find a control law of Torque (t)
trajectory yref (t) from the setpoint yd(t) [5]. The reference
                                                                                         such that the tracking error is minimized at the instant
trajectory yref (t) is in this case the solution of differential
                                                                                         (t+h), where h is an increment of time, in a way that the
equation:
                 ݀ݕ        ݀ݕ         ݀ݕ                                        predicted output q (t + h) coincides with the set-point
  ݕ ሺݐሻ  ߛଵ           ߛଶ        ǥ  ߛ        ൌ ݕௗ ሺͶሻ                      qref (t + h). Thus, the tracking error at time (t + h) will be
                   ݀ݐ           ݀ݐ            ݀ݐ                                         defined by
B. One Step Ahead Predictive Control                                                        ݁ሺ ݐ ݄ሻ ൌ ݍሺ ݐ ݄ሻ െ ݍ ሺ ݐ ݄ሻ             (9)
   The objective of one step ahead predictive control is to
find a control law u (t) which coincides the output y (t)                                   The easiest way to predict the influence of the torque
with the reference trajectory yref (t) at time (t + h) [3]–[8].                          (t) on the output q (t + h) is to use the Taylor expansion
So the criterion is to minimize the following functional:                                [10] –[11] to second order (r = [2.2]), we get:
                               ଵ
ܬଵ ൫ݕǡ ݕ ǡ ܴǡ ܳǡ ݑ൯  ൌ  ฮݕሺ ݐ ݄ሻ െ ݕ ሺ ݐ ܶሻฮ  
                                                                        ଶ                                                                      ݄ଶ
                               ଶ                                        ொ                                ݍሺ ݐ ݄ሻ ൌ ݍሺݐሻ  ݄ݍሶ ሺݐሻ               ݍሷ ሺݐሻሺͳͲሻ
                               ଵ                                                                                                               ʹ
                          ԡݑሺݐሻԡଶோ  (5)
                               ଶ
                                                                                            From equation (10), we deduce the model predictive
   By replacing equations (3) and (2) in (5) the cost                                    output at time (t + h):
function is then written:                                                                                                    ݄ଶ
                                                                                             ݍሺ ݐ ݄ሻ ൌ ݍሺݐሻ  ܸሺݍǡ ݍሶ ǡ ݄ሻ  ܹሺݍሻ߬ሺݐሻሺͳͳሻ
                                                                                                                             ʹ
                           ଵ
ܬଵ ൫ݕǡ ݕ ǡ ܴǡ ܳǡ ݑ൯ ൌൌ  ฮ൫ݕሺݐሻ  ܸ௬ ሺݔǡ ݄ሻ 
                           ଶ
                                                ଶ       ଵ                                   Where
ሺ݄ሻܹሺݔሻݑሻ െ ሺݕ ሺݐሻ  ݀ሺݐǡ ݄ሻሻฮ  ԡݑሺݐሻԡଶோ                               (6)                                          ݄ଶ ିଵ
                                                ொ       ଶ
                                                                                           ܸሺݍǡ ݄ݍሶ ǡ ݄ሻ ൌ ݄ݍሶ ሺݐሻ െ       ܯሺݍሻሺܥሺݍǡ ݍሶ ሻݍሶ  ܩሺݍሻሻ
                                                                                                                         ʹ
                                                                                         ܹ ൌ ܯሺݍሻିଵ
                  m×m
   Where Q  R       is a definite positive matrix and R 
Rm×m is a positive semi definite matrix. The optimal                                        Similarly, we apply the Taylor expansion of order 2 to
solution is then obtained by minimizing the criterion (6)                                the reference signal qref (t + h), we have:
for the nonlinear system (1) compared to control vector
u (t)                                                                                                                                          ݄ଶ
                                                                                              ݍ ሺ ݐ ݄ሻ ൌ ݍ ሺݐሻ  ݄ݍሶ  ሺݐሻ              ݍሷ ሺݐሻ
                                                                                                                                               ʹ 
ݑሺݐሻ ൌ െሾሺܹሻ் ܹܳ  ܴሿିଵ ሺܹሻ் ܳൣ݁ሺݐሻ                                                                         ൌ ݍ ሺݐሻ  ݀ሺݐǡ ݄ሻ                         (12)
ܸ௬ ሺݔǡ ݄ሻ െ ݀ሺݐǡ ݔሻሿ                             (7)
                                                                                            The dynamic tracking at time (t + h) depending on the
   e (t) is the tracking error,                                                          input torque can be then written:
  ݁ሺ ݐ ݄ሻ ൌ ݕሺ ݐ ݄ሻ െ ݕ ሺ ݐ ݄ሻ                                                            ݁ሺ ݐ ݄ሻ ൌ ݁ሺݐሻ  ܸሺݍǡ ݍሶ ǡ ݄ሻ െ ݀ሺݐǡ ݄ሻ
                                                                                                                              ݄ଶ
                                                                                                           ܹሺݍሻ߬ሺݐሻሺͳ͵ሻ
C. Stability                                                                                                                  ʹ
   Let h be a positive real number and Q a positive                                         The aim of control in the one step ahead predictive
definite matrix. Predictive optimal control described in                                 control is to find the torque  (t) which forwards to the
(7) linearizes the dynamics of the tracking error and                                    output q (t) the reference trajectory qref (t) at time (t + h )
allows a continuation of the asymptotic trajectory                                       while seeking the least possible actuators. This then leads
reference if and only if r  4 for i = 1, 2,..... m. [7] – [10].                         to an optimization criterion of the form:
                                                                                  1220
                              ଵ                                       ଵ
          ܬ ሺ݁ǡ ߬ǡ ݄ሻ ൌ ݁ሺ ݐ ݄ሻ் ܳ݁ሺ ݐ ݄ሻ  ߬ሺݐሻ் ܴ߬ሺݐሻ                                   g1 = (m1 (lcl + l1 ) + m2l1 + mLl1) g cos q1 + (m2 (lc 2 + l2 ) + mL (l2 + lcl )) g cos(q1 + q2 )
                        ଶ                     ଶ
                                                       (14)                                   g 2 = (m2 (lc 2 + l2 ) + mL (l2 + lcl )) g cos(q1 + q2 )
   From the first derivative of the cost function J, we find                                     Where
the optimal solution for the control signal as:
                                                                                              IL the inertia of the load organe Link
    ߬ሺݐሻ ൌ                                                                                    Icl is the center of gravity of the load .
                                                                          ்
                                                  ିଵ
             ర                                            మ                                 J1 and J2 represent the inertia of the motors.
െ ቂ       ܹሺݍሻ் ܹܳሺݍሻ  ܴቃ                   ቆ        ܹሺݍሻቇ ܳ൫݁ሺݐሻ 
                ଶ                                          ଶ
ܸݍǡݍǡ݄݀ݐǡ݄                                   (15)                       The numerical values of the parameters of the
                                                                                              represented manipulator are given in the table below
    Consider the manipulator similar to the Fig. 1. The
                                                                                               TABLE I.        PHYSICAL PARAMETERS OF TWO LINKS MANIPULATOR
manipulator consists of two rigid bodies of masses m1
and m2, lengths l1and l2. The angles of the joints are
                                                                                                          l 1 = 0.45      m1 =         l C1 =        I1 = 6.25   J1 = 4.77
respectively q1 and q2 and a load mass mL of diameter                                         Link 1
                                                                                                          m               100 Kg       0.15 m        Kg m2       Kg m2
lL.
                                                                                                                          m2 =         l C2 =        I2 = 0.61   J2 = 3.58
                                                                                              Link 2     l 2 = 0.20 m
                                                                                                                          25 Kg        0.15 m        Kg m2       Kg m2
                                                 ݉ ǡ ܫ                                                                  mL =         l CL=         IL= 7.68
                                                                                                                          40 Kg        0.15 m        Kg m2
                                        ݉ଶ ǡ ܫଶ                 ݈ଶ  ݈                         The reference models chosen in continuous time are:
                                                                ݍଶ                                                                 ݍଵ
                                            ݈ଶ                                                                            ݍ ൌ ቚݍ     ቚ
                                                                                                                                    ଶ
                                                                                                 Where:
                                                            ܬଶ
                                  ݉ଵ ǡ ܫଵ                                                                                   ఠమ
                                                                                                    ݍ ሺݏሻ ൌ                         ݎ ሺݏሻ ǥ ǥ ݅ ൌ ͳǡʹ             (16)
                                                                                                                        ௦ ାଶకఠ௦ାఠమ
                                                                                                                         మ
                     ݈ଵ
                                            ݈ଵ
                                     ݍଵ
                                                                                                 The nonlinear predictive controller is used to track
           ܬଵ                                                                                 these desired trajectories
                           Fig. 1. Schematic of Two axis robot                                                    ߨ
                                                                                                                     Ͳ݅ݏ  ݐ ʹǤͷݏ
                                                                                                       ݎଵ ሺݐሻ ൌ ൝ ʹ
                                                                                                                 ͲǤͻሺͳ െ ሺͳǤʹݐሻሻ ݐ݅ݏ ʹǤͷݏ
                                                                                                                  െߨ Ͳ݅ݏ  ݐ ͵ݏ
                                                                                                        ݎଶ ሺݐሻ ൌ ቊ ߨ
                                                                                                                      ݐ݅ݏ ͵ݏ
   The dynamic model is described by equation (10) with                                                            Ͷ
the following components [7] – [10]:
                                                                                                 The initial displacements and velocities are chosen as:
A11 = m2l12 + ml l12 + I1 + I 2 + Il + J1 + 2 (m2l1(lc2 + l2 ) + ml l1(l2 + lcl )) cos q2
A12 = A21 = I 2 + I l + (m2l1(lc2 + l2 ) + ml l1(l2 + lcl )) cos q2
                                                                                                              q1(0)=q2(0)=0°, ݍሶ ଵ ሺͲሻ ൌ ݍሶ ଶ ሺͲሻ ൌ 0
A22 = I 2 + Il + J 2
                                                                                                The choice of the damping coefficient and natural
c11 = − q 2 ( m 2 l1 (l c 2 + l 2 ) + m L l1 ( l 2 + l cL )) sin q 2 ;                       angular frequency of the filter is as follows:
c12 = − ( q1 + q 2 )( m 2 l1 (l c 2 + l 2 ) + m L l1 (l 2 + l cL )) sin q 2 ;
c 21 = q1 ( m 2 l1 (l c 2 + l 2 ) + m L l1 (l 2 + l cL )) sin q 2 ;                                                      =1, w1=w2=5rad/s.
c 22 = 0 .
                                                                                       1221
                        position: q1, qref1                                 position: q2, qref2                                               Tracking:q1-qref1                              Tracking: q2-qref2
              1.8                                              1                                                                  0.06                                           0.04
                                 position q1                                         position q2
              1.6                poistion qref1              0.5                     poistion qref2                               0.05
                                                                                                                                                                                 0.02
              1.4                                              0
                                                                                                                                  0.04
              1.2                                            -0.5                                                                                                                   0
                                                                                                                                  0.03
               1                                              -1
                                                                                                                      (rad)
                                                                                                                                                                         (rad)
      (rad)
                                                     (rad)
                                                                                                                                  0.02                                           -0.02
              0.8                                            -1.5
                                                                                                                                  0.01
              0.6                                             -2                                                                                                                 -0.04
                                                                                                                                      0
              0.4                                            -2.5
                                                                                                                                                                                 -0.06
              0.2                                             -3                                                                  -0.01
               0                                             -3.5                                                                 -0.02                                          -0.08
                    0          500            1000                  0              500            1000                                    0         500           1000                   0          500           1000
                             time(s)                                             time(s)                                                          time(s)                                         time(s)
                                                                    (a)                                                                                             (b)
                                                                                    Torque r1                                                 Torque r2
                                                               600                                                    800
                                                               500
                                                                                                                      600
                                                               400
                                                                                                                      400
                                                               300
                                                        Nm
                                                                                                                Nm
                                                               200                                                    200
                                                               100
                                                                                                                              0
                                                                                                                     -200
                                                              -100
                                                              -200                                                   -400
                                                                        0              500               1000                     0              500              1000
                                                                                     time(s)                                                   time(s)
                                                                                                                (c)
        Fig. 2. One step ahead predictive control of two link robot: (a) Angle positions and references, (b) tracking errors and (c) applied torques
   The nonlinear controller has been tested by                                                                        obtained by minimizing the quadratic error between
simulation where the control parameters Q=105 In,                                                                     them.
R=10-12 In and h is set to 0.005. Simulation results are                                                                 This approach has been applied to a nonlinear
show in Fig. 2. These Figures give the angular position                                                               system, that of two links manipulator to control the
(q1(t),q2(t)), angle references (qref1(t),qref2(t)) and the                                                           angle positions. Simulation results clearly show the
position tracking errors also the applied torques. The                                                                effectiveness of this approach in terms of references
simulation results show clearly the effectiveness of the                                                              tracking (angle positions) where the control objective is
one step ahead controller in terms of references                                                                      achieved with good accuracy.
tracking (angle positions). Note here the presence of
undulation in the torque signal; this problem can be                                                                                                              REFERENCES
solved by imposing of incremental variation of control                                                                [1]             Koo, T. J.: stable model reference adaptive fuzzy control
signal constraints in control objective. Finally the                                                                                  of a class of non linear systems. IEEE transactions on
major drawback of one step ahead predictive control is                                                                                Fuzzy systems, vol. 09, no4, pp. 624-636, August 2001.
the need to perform several simulations to obtain                                                                     [2]             Feng, G.:An approach to adaptive control of dynamics
numerical values of optimal parameters settings.                                                                                      systems. IEEE, vol. 10, no 2, pp. 268-275, Apil 2002.
                                                                                                                      [3]             D, W.; Mohtadi, C.: Generalized predictive control,
                               IV. CONCLUSION                                                                                         Part1” The basic algortithm. Part II “Extension and
                                                                                                                                      interpretation”, Automatica, Vol.32,no.2,1987,pp.137-
   This work has focused on the contribution to the                                                                                   160.
development of original control structure: The one step                                                               [4]             Henson, E. M. A.; Seborg, D. E.: Non linear process
ahead predictive control, a strategy based on nonlinear                                                                               control. New Jersey, Prentice Hall, 1997 . H.       Poor,
predictive model where optimization mechanism of the                                                                                  An Introduction to Signal Detection and Estimation.
quadratic criterion is used to extract the control law.                                                                               New York: Springer-Verlag, 1985, ch. 4.
The principle of the one step ahead predictive control,                                                               [5]             Ping, L.: Non linear predictive control of continuous
                                                                                                                                      nonlinear systems. Journal of Guidance, control and
is based on the Taylor series expansion of the predicted                                                                              dynamics, vol.17, no.3,May-June 1994,pp.553-560.
output and the reference where the control law is                                                                     [6]             Singh, S.N.; Steinberg, M.; Digirolamo, R.D.: Nonlinear
                                                                                                                                      predictive control of feedback linearizable systems and
                                                                                                          1222
       flight control system design. Journal of Guidance ,
       control and dynamics, vol. 18, no5, 1995, pp.1023-1028.
[7]    Hadjer, R.: Contribution à l’analyse et à la synthèse de
       commandes adaptatives et predictive. Application à un
       processus physique. Doctoral thesis, USTHB university,
       Algeria, 2000.
[8]    Slotine, J. E.: Applied nonlinear control. Prentice Hall,
       1991, chap.9.
[9]    Hedjar, R.; Boucher, P.: Nonlinear receding horizon
       control of rigid link robot manipulators. International
       journal of advanced robotic systems, Vol.2, No.1, pp.
       15-24, March 2005.
[10]   Hedjar, R. ; Toumi, R. ; Boucher, P. ; Dumur, D. :
       Commande prédictive non linéaire d’un robot
       manipulateur rigide. Journal Européen des systèmes
       Automatisés (JESA) Vol.36, No.6, pp.845-863, 2002.
[11]   Chu, Y. S.; Stepanenko, Y.: On the robust control of
       robot manipulators including actuator dynamics. Journal
       of robotic Systems, vol.13, no1, 1996, pp.1-10
                                                                   1223