Automatic PID Controller Tuning for Robots with

0 downloads 0 Views 83KB Size Report
of the step input (if different than unity). Finally, the parameter Tj is ... where the inputs of the MIMO unity feedback system are qr1 = q10 + 0.01 rad and qr2 = q20.
Automatic PID Controller Tuning for Robots with Nonlinear Friction at the Joints Abílio Azenha, Ph.D. Abstract − This paper describes an approach to automatic tuning of PID position controllers for manipulators with nonlinear friction at the articulations. The algorithm works in joint space coordinates and it uses the calculation of PID controllers parameters using step input torque signals. Several simulation results show this scheme performance. Index Terms − Robot manipulators; friction; time domain analysis; simulation.

tuning;

I. INTRODUCTION In this article an algorithm for the tracking control of robot manipulators is tested. The motivation for this work is the need for accurate position control in tasks such as assembly, deburring, painting, welding, etc. just before the robot end-effector contact with the environment. On the other hand, the friction phenomenon is always present in such systems, at least in the arm joints. This leads to detrimental aspects in the systems performance [1-7], because for small velocities the stick-slip effect arises. In this line of thought, it is worthwhile to take the nonlinear friction phenomenon into consideration. Another question is how to choose the suitable system controller in terms of simplicity, practicability and performance. Of course, the classical PID controller is the first choice, because of its simplicity and practicability. Nevertheless, it remains the problem of the parameters tuning, being the desirable solution an automatic scheme (i.e. without the user’s need for extra calculations). In this paper the open-loop Ziegler-Nichols [8] approach is used, which was originally employed in the rough estimation of PID controllers parameters for simple single-input-single-output (SISO) lumpedcharacteristics systems. Some other authors designed PID controllers recently (e.g. [9-11]) with different objectives and resources in mind, being the systems performance a common final effort. In this line of thought, the 2R robot with nonlinear friction at the joints and in position control (i.e. without constraint

surfaces) is employed as prototype manipulator. The friction model comprises stiction, Coulomb, viscous and Stribeck effects to simulate efficiently the low velocity behavior. The arm is moved to the neighborhood of the task operating point and then two input steps are applied (one at a time and in the respective joint torque) for the automatic PID parameters tuning. Next the PID controllers parameters are calculated numerically by the (digital) control system using the classical Ziegler-Nichols procedure. The multiple-input-multiple-output (MIMO) system characteristic and the manipulator gravitational dynamic terms are taken into consideration. The article is organized as follows. Section two describes the models employed in this work. Section three presents the auto-tuning algorithm and section four shows some simulation results. Finally, section five outlines the main conclusions. II. SYSTEM MODELING In this section the dynamic models for both the ideal robot and the nonlinear friction to be accounted for in the arm joint torques are presented. A. Ideal rigid-link-rigid-joint robot The dynamic equation of an ideal rigid-link-rigid-joint robot with n links is: τ = H(q)&q& + c(q, q& ) + g(q)

(1)

Here τ is the n × 1 vector of actuator torques, q is the n × 1 vector of joint coordinates, H(q) is the n × n inertia matrix, c(q, q& ) is the n × 1 vector of centrifugal/Coriolis terms and g(q) is the n × 1 vector of gravitational effects. In this study the 2R robot will be adopted as prototype manipulator, with dynamics given by:

Department of Electrical and Computer Engineering, Faculty of Engineering, University of Porto, Rua Dr. Roberto Frias, 4200 – 465 Porto, Portugal, Phone: +351-225081400 (ext.1312), Fax: +351225081443, E-mail: [email protected]

(m1 + m2 )r12 + m2r2 2 +  H(q) = +2m2r1r2C2 + J1m + J1g  m r 2 + m r r C 2 1 2 2  22

m2r2 2 + m2r1r2C2   (2a)   m2r2 2 + J2 m + J2 g 

−m r r S q& 2 − 2m2 r1r2 S2 q&1q& 2  c(q, q& ) =  2 1 2 2 2  2 m2 r1r2 S2 q&1  

page 1 of 6

(2b)

 g(m1 r1C1 + m2 r1C1 + m2 r2 C12 ) g(q) =   gm2 r2 C12  

(

where Ci = cos(qi ),

(

)

Cij = cos qi + q j ,

)

Si = sin(qi ) ,

S ij = sin q i + q j . The manipulator is depicted in

Fig. 1 while the numerical values adopted for the 2R robot are presented in Table I.

FStribeck = FS e



(5b)

Td = 0.5T

(5c)

(6)

where c(t) is the process output, e(t) is the error signal and m(t) is the controller output. B. Application to Robot Manipulators Position Control In this study, the parameters T and Rr are found numerically, through application of a step test input (with duration tt = 0.25 s) when the system is at rest and in open-loop mode. This test input is calculated by equation (7): τi = g i (q 0 ) + δij h j (t ), i = 1,..., n, j = 1,..., n

(7)

(3)

where xS is the Stribeck velocity constant. All the previous components are summed up for the friction model being suitable for the study and the mathematical model is correspondent to the graph of Fig. 2.

where q0 = [q10, q20,..., qn0]T is the initial joint operating point and hj(t) is the input step applied at t = 0 s. Note that the magnitude of hj(t) must be greater then the stiction torque. The δij coefficient is defined by (8): 1, i = j δ ij =  0, i ≠ j

III. CONTROLLER TUNING In this section the Ziegler-Nichols method is shown how to be used to tune a PID controller, and how this method will be applied to robot manipulators is explained. Stability considerations are also made. A. Ziegler-Nichols Open-Loop Method The Ziegler-Nichols open-loop method [8] assumes that the process to be controlled has the following transfer function (4): K p e − Ts

Ti = 2T

 dc  1 m(t ) = K e + ∫ e(τ )dτ − Td  dt   Ti

x x S

(5a)

where Rr is called the reaction rate and is assumed to be equal to Kp. The time response of the employed PID controller is (6):

B. Nonlinear Friction The friction model, used in all the simulations, present in the contact of a mass M with other mass and with relative velocity x is depicted in Fig. 2. It comprises four components: i) stiction (static friction); ii) Coulomb friction; iii) viscous friction; iv) Stribeck effect. The stiction represents the phenomenon near the origin and it is simulated through the Karnopp’s [12] algorithm (Fig. 3). The Coulomb part is related to a constant friction force (KC) as a function of relative velocity ( x = V ). The viscous component is a force that is proportional to the relative velocity (with proportionality constant B). Finally, the Stribeck effect stands for an exponential behavior near the origin and can be defined by the following equation (3):

1.2 TRr

K=

(2c)

(8)

The j index is the test number (j = 1,...n), i.e. the total number of tests is equal to the joints number n. In this line of thought, Rrj is the maximum derivative of the output xj(t) = qj(t) − qj0 and divided by the amplitude of the step input (if different than unity). Finally, the parameter Tj is obtained by the following expression (9), where all the right-hand values are obtained in the point corresponding to the greatest system output slope: T j = t j1 −

(4)

x j1

(9)

x j1

s

where Kp is calculated as the maximum value of the unit step system response slope and T is the corresponding time delay. Then, the PID parameters are obtained through the set of formulae (5):

This last equation can be illustrated by the plot in Fig. 4. Using this scheme, the decentralized PID controllers parameters Kj, Tij and Tdj (j = 1,...,n) are computed with their respective identified values of Tj and Rrj (j = 1,...,n).

page 2 of 6

C. Stability Analysis Some stability issues will be carried out through the Lyapunov method. Consider the set of dynamic equations describing this system:  + c(q, q  ) + g (q) + τ friction (q, q  ), H (q) > 0 τ = H(q)q  = ( − ) + −1 ( − )(τ )dτ −  Td q τ K q r q Ti ∫ q r q (10)

[

]

where K, Ti and Td are the n × n diagonal PID parameters matrices, and qr is the joint reference input vector. Let be V a Lyapunov candidate function: V =

1 T q H(q )q + P (q ) 2

(11)

where: g (q ) =

Td2 = Ti2 = 0.260 s. Note that the equality Tdi = Tii (i = 1,...,n) is always employed, because the simulations results showed always the better system performance under this condition. This agrees with last section stability results, because Tdi is raised some order of magnitude [see equations (5b-c)]. Fig. 7 depicts the second simulation here for qr1 = q10 and qr2 = q20 + 0.01 rad. Obviously, the PID controllers parameters are the same as for the first simulation, because the physical system is the same. It is observed that the steady-state error signal is very small (q2 has an error even lower than q1) and the overshoot is not significant. The signals in the loops are all somehow smooth.

∂P(q ) , ∂q

(12a) (12b)

P (q ) = q T g(q )

V. CONCLUSIONS This paper studied the auto-tuning of PID controllers for robot manipulators subjected to nonlinear friction at the joints. The friction model used the more important aspects for a sufficiently detailed compromise between reality and simplicity. The obtained results are good, for an accurate position control without the need for trial-and-error PID parameters tuning, as initially planned.

The time derivative of V becomes [13], using expressions (10) and (12): V =

d 1 T  q H (q )q  + q T g (q ) = dt  2 

[

ACKNOWLEDGMENT The author is thankful to Prof. Adriano Carvalho for his encouragement to the writing of this paper.

(13)

]

= q T τ − τ friction (q, q ) = = q T K (q r − q ) + Ti−1 ∫ (q r − q )(φ)dφ −   0 − q T KΤ d q + τ friction (q, q )

REFERENCES

t

[

]

Analyzing equation (13) we conclude that for better system stability, the PID controller parameters must be such that Kjj is small, being Tijj and Tdjj (j = 1,...,n) large. In the next section these arguments are confirmed. IV. RESULTS In this section two simulation examples for the 2R robot with nonlinear friction at the joints are presented. The numerical values tested are (with variables translated from linear to rotational motion): KCi = 5 Nm, Bi = 0.5 Nm/s, qi0 = 15π/36 rad, rad/s, τHi = 6 Nm, Dωi = 0.001 q Si = 0.2 rad/s , τSi = 1 Nm, hi (t) = 10 Nm, i = 1, 2. The tested system is presented in Fig. 5 in block diagram form. In this line of thought, Fig. 6 shows a simulation where the inputs of the MIMO unity feedback system are qr1 = q10 + 0.01 rad and qr2 = q20. The respective auto-tuned PID controllers parameters are Td1 = Ti1 = 0.259 s, K2 = 778 Nm, K1 = 719 Nm,

page 3 of 6

[1] B. Armstrong-Hélouvry, P. Dupont and C. Canudas-de-Wit, “A Survey of Models, Analysis Tools and Compensation Methods for the Control of Machines with Friction,” Automatica, vol. 30, no. 7, pp. 1083-1138, 1994. [2] A. Azenha and J.A.T. Machado, “Variable Structure Control of Robots with Nonlinear Friction and Backlash at the Joints,” in Proceedings of the IEEE International Conference on Robotics and Automation, Minneapolis, USA, 1996, pp. 366-371. [3] A. Azenha and J.A.T. Machado, “On the Describing Function Method and the Prediction of Limit Cycles in Nonlinear Dynamical Systems,” Journal of Systems Analysis, Modeling and Simulation, vol. 33, no. 3, pp. 307-320, 1998. [4] M.R. Popovic and A.A. Goldenberg, “Modeling of Friction Using Spectral Analysis,” IEEE Transactions on Robotics and Automation, vol. 14, no. 1, pp. 114-122, 1998. [5] H. Du and S.S. Nair, “Modeling and Compensation of Low-Velocity Friction with Bounds,” IEEE Transactions on Control

[6]

[7]

[8]

[9]

Systems Technology, vol. 7, no. 1, pp. 110-121, 1999. P. Lischinsky, C. Canudas-de-Wit and G. Morel, “Friction Compensation for an Industrial Hydraulic Robot,” IEEE Control Systems, vol. 19, no. 1, pp. 25-32, 1999. P. Tomei, “Robust Adaptive Friction Compensation for Tracking Control of Robot Manipulators,” IEEE Transactions on Automatic Control, vol. 45, no. 11, pp. 21642169, 2000. J.L.M. de Carvalho, Dynamical Systems and Automatic Control, Prentice-Hall International, London, 1993. M. Kawafuku, M. Sasaki and S. Kato, “SelfTuning PID Control of a Flexible MicroActuator using Neural Networks,” in Proceedings of the IEEE International Conference on Systems, Man, and Cybernetics, La Jolla, San Diego, California, USA, 1998, pp. 3067-3072.

[10] Q.-G. Wang, T.-H. Lee, H.-W. Fung and Y. Zhang, “PID Tuning for Improved Performance,” IEEE Transactions on Control Systems Technology, vol. 7, no. 4, pp. 457-465, 1999. [11] B. Armstrong, D. Neevel and T. Kusik, “New Results in NPID Control: Tracking, Integral Control, Friction Compensation and Experimental Results,” IEEE Transactions on Control Systems Technology, vol. 9, no. 2, pp. 399-406, 2001. [12] D. Karnopp, “Computer Simulation of StickSlip Friction in Mechanical Dynamic Systems,” ASME Journal of Dynamic Systems, Measurement, and Control, vol. 107, no. 1, pp. 100-103, 1985. [13] R. Lozano, A. Valera, P. Albertos, S. Arimoto and T. Nakayama, “PD Control of Robot Manipulators with Joint Flexibility, Actuators Dynamics and Friction,” Automatica, vol. 35, no. 10, pp. 1697-1700, 1999.

TABLE I: The 2R robot parameters. ri Jim mi (Kg) (m) (Kgm2) 0.5 1.0 1.0 6.25 0.8 1.0

Link i 1 2

y

Jig (Kgm2) 4.0 4.0

m2 r2 q2 J2g

Ffriction

m1 J1g

B

KC

r1 q1 J2m

x

x B

J1m

−KC DV

Fig. 1: The 2R robot.

Fig. 2. Plot of the friction model.

page 4 of 6

P V −DP

∫ dt

DP

P

P

F

V

+ −

DP = M · DV

Ffriction

1

−DV

0 −DV

DV

DV

+ Fsliping

+

S Ff FH

× Fstick −FH

Fig. 3. Block diagram of the Karnopp’s stick-slip motion simulation algorithm.

xj(t)

xj1 0

tj1

t

Fig. 4. Graph for determining parameter Tj (j = 1,...,n). Error Signal +

qr

qe



Controller Output Decentralized PID Controller

τ

Process Output Robot with Nonlinear Joint Friction

q

Fig. 5. Feedback control system.

page 5 of 6

q

q e1

q e2

0.15

(rad/s)

(rad/s)

0.1

0.05

0.05 0 -0.04

-0.03

-0.02

-0.01

-0.05

0.1

-0.04 0

0.01

q e1

-0.1

-0.03

-0.02

0.02

0 -0.01 0 -0.05

qe 2

-0.1

(rad)

0.01

0.02

(rad)

-0.15

-0.15

a) τ1 (N m )

10 0

τ2 (N m )

0 -1 0

-1 0 -2 0

-2 0

-3 0 -4 0

-4 0

-3 0

-5 0

-5 0 -6 0

-6 0 0

1

2

3 tim e (s )

4

5

6

0

1

2

3 tim e (s )

4

5

6

b) Fig. 6. Time responses for the 2R robot under position control and the auto-tuning PID scheme (K1 = 719 Nm, Td1 = Ti1 = 0.259 s, K2 = 778 Nm, Td2 = Ti2 = 0.260 s, zero incremental input δqr2 = qr2 − q20): a) Phase-plane, b) Torque inputs. q e1

(rad/s)

q e 2

0.1

(rad/s)

0.05

0.05 0 -0.03

-0.02

-0.01

0.1

0

0.01

-0.04

0.02

-0.03

-0.02

-0.05

q e1

0 -0.01 0 -0.05 -0.1

(rad)

-0.1

-0.15

-0.15

-0.2

0.01

qe2

0.02

(rad)

a) τ1 (Nm )

0 -10 -20 -30 -40 -50 0

1

τ2 (Nm )

20 10 0 -10 -20 -30 -40 -50 -60 2

3 tim e (s)

4

5

6

0

1

2

3 tim e (s )

4

5

6

b) Fig. 7. Time responses for the 2R robot under position control and the auto-tuning PID scheme (K1 = 719 Nm, Td1 = Ti1 = 0.259 s, K2 = 778 Nm, Td2 = Ti2 = 0.260 s, zero incremental input δqr1 = qr1 − q10): a) Phase-plane, b) Torque inputs.

page 6 of 6