• No results found

Feedback linearization control of a two-link robot using a multi-crossover genetic algorithm

N/A
N/A
Protected

Academic year: 2021

Share "Feedback linearization control of a two-link robot using a multi-crossover genetic algorithm"

Copied!
6
0
0

Loading.... (view fulltext now)

Full text

(1)

Short communication

Feedback linearization control of a two-link robot using a multi-crossover genetic algorithm

Jian Liung Chen

a,*

, Wei-Der Chang

b

aDepartment of Electrical Engineering, Kao Yuan University, Kaohsiung 821, Taiwan

bDepartment of Computer and Communication, Shu-Te University, Kaohsiung 824, Taiwan

Abstract

In this paper, we propose a novel multi-crossover genetic algorithm (GA) to identify the system parameters of a two-link robot. The resulted system model by the proposed GA is then applied to the feedback linearization control such that the two-link robot system can be transferred to a linear model with a nonlinear bounded time-varying uncertainty. To deal with the uncertainty, a sliding mode control approach is designed to achieve the tracking control. Finally, some simulation results are demonstrated to show the utility of our pro- posed method.

Ó 2008 Elsevier Ltd. All rights reserved.

Keywords: Multiple-crossovers; Two-link robot; Parameters estimation; Feedback linearization; Sliding mode control

1. Introduction

The mathematical representation of a two-link robot is a highly nonlinear dynamic equation. It is kind of difficult to design a controller to achieve the angle setting of a robot. In the literatures, there are many control methods proposed for solving such the robot control system, for example, the rate linearized mode (Golla, Garg, & Hughes, 1981), model-based control (Kawaski & Kato, 1991), nonlinear robust control (Kuo & Wang, 1989), feedback linearization (Khatib & Burdick, 1986), and Taylor approximation (Ser- aji, 1987). Since the feedback linearization control is to use nonlinear feedback terms to transform the two-link robot system into an equivalent linear system, it has been caught our attentions. A mathematical model for the two-link robot is needed if this technique is applied. However, under many physical situations, exact mathematical models can not be easily obtained especially for the system parameters of a two-link robot. In the paper, a multi-crossover genetic

algorithm (GA) is initially developed for identifying system parameters of a two-link robot, and then this estimated model is applied to the feedback linearization.

The GA method has been proven as a powerful tool for solving optimal or near optimal solution for an given optimi- zation problem (Angelov & Buswell, 2003; Carvalho & Fre- itas, 2004; Davis, 1991; Goldberg, 1989; Montiel, Castillo, Melin, & Sepulveda, 2003; Montiel, Castillo, Sepulveda, &

Melin, 2004; Muhlenbein, 1994; Muhlenbein & Mahnig, 2002; Tang & Xu, 2005; Tsutsui & Goldberg, 2001). It pro- vides better searching capability over the traditional gradi- ent method. Because the gradient method searches for a problem solution only from a single direction, while GA method is from multiple directions due to its crossover and mutation operations. This means that it is highly possible to escape from a local minimum (Huang & Huang, 1997).

In the binary GA (Kristinsson & Dumont, 1992; Jiang &

Wang, 2000), all parameters of interest must be encoded as binary digits (genes) and then collect these binary digits to be a string (chromosome). In contrast to the binary GA, another kind of real-coded GA has been also introduced to a wide variety of applications as in Tang and Xu (2005), Huang and Huang (1997), Blanco, Delgado, and Pegalajar

0957-4174/$ - see front matterÓ 2008 Elsevier Ltd. All rights reserved.

doi:10.1016/j.eswa.2008.01.048

* Corresponding author.

E-mail addresses:[email protected](J.L. Chen),[email protected] stu.edu.tw(W.-D. Chang).

www.elsevier.com/locate/eswa Expert Systems with Applications 36 (2009) 4154–4159

Expert Systems with Applications

(2)

(2001), Deb and Gulati (2001), Zamparelli (1997), Tzeng and Lu (2000), Lu and Tzeng (2000), Xu and Daley (1995). All genes in the chromosome are now encoded as real numbers.

For most real optimization problems, this type of real-coded GA has more advantages over the conventional binary GA.

For example, the length of a chromosome used in the real- coded GA becomes much shorter than that of the binary GA, and it is easier to implement the real-coded GA into the computer programs.

Unlike the general crossover operation by using two chromosomes, a multi-crossover operation will be pro- posed in this paper. We use the improved real-coded GA to identify the system parameters of a two-link robot. All of unknown parameters are collected as a chromosome, and a population of these chromosomes will be evolved by using genetic operations of reproduction, multiple- crossover, and mutation. Due to the error caused by parameters estimation, the model of two-link robot can’t be exactly linearized according to the estimated model.

Therefore, the inter loop system, i.e. the connection between the estimated model and actual two-link robot can be viewed as a linear system with nonlinear bounded time-varying uncertainty. Furthermore, we will find out the uncertainty to conform the matching condition. Since the sliding mode control is a popular technique for robust controls under the matching condition (Khalil, 1996), we use it to overcome the drawback and to achieve the track- ing control of a two-link robot. In the sliding mode control, state trajectories of system are forced to reach a sliding manifold in finite time, and stay on the manifold for all future time. Since the inter loop system is linear, the con- troller design can be reduced mostly and be simply well done. Simulation results will be illustrated to show that the angles of a two-link robot can be regulated to the desired output by using our proposed method.

2. Problem formulation

Consider the nonlinear dynamic equation for a two-link robot (Spong & Vidyasagar, 1989), which is shown in Fig. 1, described as follow

MðhÞ€hþ N ðh; _hÞ þ GðhÞ ¼ s ð1Þ

where

h¼ h½ 1 h2Tis the output vector;

s¼ s½ 1 s2Tis the two-dimensional torque input vector;

MðhÞ ¼ M1 M2 MT2 M4

 

is the symmetric inertia matrix and is the positive definition for all h2 R2,

M1¼ 1=3m1l21þ 1=12m2l22þ m2ðl21þ 1=4l22Þ þ mpðl21þ l22Þ þ ðm2þ 2mpÞl1l2cos h2

M2¼ 1=12m2l22þ 1=4m2l22þ mpl22þ 1=2ðm2þ 2mpÞl1l2cos h2

M4¼ 1=12m2l22þ 1=4m2l22þ mpl22 Nðh; _hÞ ¼ ½ N1 N2T

accounts for centrifugal and Coriolis forces;

N1¼ ðm2þ 2mpÞl1l2_h1_h2sin h2

 1=2ðm2þ 2mpÞl1l2_h22sin h2

N2¼ ð1=2m2þ mpÞl1l2_h1sin h2

GðhÞ ¼ ½ G1 G2Taccounts for gravity forces;

G1¼ ð1=2m1l1þ m2l2þ mpl1Þg sin h1

þ ð1=2m2l2þ mpl2Þg sinðh1þ h2Þ G2¼ ð1=2m2þ mpÞl2gsinðh1þ h2Þ:

For convenience, let ½ x1 x2 x3 x4 ¼ ½ h1 _h1 h2 _h2.

Since M(h) is the positive definition for all h2 R2, we set M1ðhÞ ¼ M1 M2

MT2 M4

 1

¼ u1 u2 uT2 u4

 

:

The nonlinear dynamic Eq. (1) can be represented as the state equation

_x1

_x2

_x3

_x4

2 66 64

3 77 75¼

x2

u1ðN1þ G1Þ  u2ðN2þ G2Þ x4

uT2ðN1þ G1Þ  u4ðN2þ G2Þ 2

66 64

3 77 75þ

0 0

u1 u2

0 0

uT2 u4 2 66 64

3 77 75s

ð2Þ and output equation

y1 y2

 

¼ 1 0 0 0

0 0 1 0

  x1

x2 x3

x4 2 66 64

3 77

75: ð3Þ

Moreover, let C = [c1,c2, . . . , cm] be an unknown parameter vector in the two-link robot system. From the evolutionary point of view, C is called a chromosome and all ci, for i2 m and m = {1,2, . . . , m}, are called genes.

3. A multi-crossover genetic computation

To execute the genetic operations, a performance index or an objective function should be defined in the beginning.

In GA, it only requires the computation of the objective function to guide its search, and there is no requirement for its differentiation, which may be usually needed in the traditional optimal method. A summation of squared error θ

θ

1

2

mp l1

l2 m1

m2

Fig. 1. A two-link robot system.

(3)

(SSE) is chosen as the objective function in this study defined by

SSE¼XT

k¼1

y1ð Þ  ^yk 1ð Þk

ð Þ2þ yð 2ð Þ  ^yk 2ð Þk Þ2

h i

¼XT

k¼1

e21ð Þ þ ek 21ð Þk

 

; ð4Þ

where T is the number of given sampling steps, y1and y2

are the actual outputs in (3), ^y1 and ^y2 are the evaluated outputs. Our purpose is to find the optimal model param- eter vector C by using the proposed method such that the SSE in(4)is minimized.

The GA starts with a given random initial population that contains many chromosomes. Each chromosome in the population represents a set of possible parameter solu- tion for the two-link robot system. The chromosomes are then evolved within the user-defined interval [cl, cu] to gen- erate better offspring. When a generated chromosome goes beyond the interval, the original chromosome is retained.

In the following development, let N represent the size of population, parameters pr, pc, and pm are referred to as probabilities of reproduction, crossover, and mutation, respectively. In addition, throughout the paper a uniform probability distribution is assumed for all used random val- ues. The detailed descriptions of three genetic operators are stated as follows.

3.1. Reproduction

For the reproduction operation there are two well known selection mechanisms: the roulette wheel and tour- nament selections. The roulette wheel selection can be visu- alized by imagining a wheel where each chromosome occupies an area that is related to its value of objective function. When a spinning wheel stops, a fixed marker determines which chromosome will be selected to repro- duce (Blanco et al., 2001). This kind of selection mecha- nism needs more numerical computations. However, the tournament selection is simpler than the roulette wheel selection. In this selection pr N chromosomes with better SSE values are duplicated into the population, and the same amount of chromosomes with worse SSE values are discarded from the population. This keeps the same popu- lation size.

3.2. Multiple-crossover

Unlike the traditional crossover by using only two chro- mosomes, a novel crossover formula that contains three parent chromosomes is proposed in this study. We assume that chromosomes C1, C2, and C3 are selected from the population randomly and SSE (C1) is the smallest among three SSE values. Also, let c be a random number selected from [0, 1]. If c P pc, then the following multiple-crossover are performed to generate new chromosomes

C1 C1þ q 2Cð 1 C2 C3Þ;

C2 C2þ q 2Cð 1 C2 C3Þ;

C3 C3þ q 2Cð 1 C2 C3Þ;

ð5Þ

where q2 [0,1] is a random value determining the cross- over grade of these three. If c < pc, no crossover operation is performed. It is clear fromFig. 2 that the resulting ad- justed vector (2C1 C2 C3) is a combination of vectors C1 C2and C1 C3.

3.3. Mutation

The mutation operation follows the crossover and pro- vides a possible mutation on some chosen chromosomes C. Only pm N chromosomes in the population will be randomly selected to mutate. The formula of mutation operation for the selected C is given by

C C þ s  U; ð6Þ

where s is a positive constant and U2 Rmis a random per- turbation vector producing a small effect on C. Performing the above three evolutionary operations for the whole pop- ulation one time is called a generation. The algorithm stops if the pre-specified number of generations G is achieved.

4. Feedback linearization and controller design

In this study, the system parameters l1, l2, m1, and m2in (1) are assumed to be unknown and will be estimated by using the proposed multi-crossover GA. Hence, let

^l1; ^l2; ^m1; and ^m2 be the estimated system parameters and we have the following nonlinear model for the two-link robot system

b

MðhÞv þ bNðh; _hÞ þ bGðhÞ ¼ s ð7Þ where bMðhÞ ¼ Mb1 Mb2

b MT2 Mb4

 

, bNðh; _hÞ ¼ Nb1 b N2

 

, bGðhÞ ¼ Gb1

b G2

 

, s¼ s1

s2

 

, h¼ h1

h2

  , b

M1¼ 1=3 ^m1^l21þ 1=12 ^m2^l22þ ^m2^l21þ 1=4^l22 þ mp^l21þ ^l22

þ ^m2þ 2mp

 ^l1^l2cos h2; Γ1

Γ2

Γ3 2

1−Γ Γ

3 1−Γ Γ ) ( )

1−Γ2 + Γ1−Γ3

Fig. 2. A modified adjusting vector by using the proposed multiple- crossover.

(4)

b

M2¼ 1=12 ^m2^l22þ 1=4 ^m2^l22þ mp^l22 þ 1=2 ^m2þ 2mp

 ^l1^l2cos h2; b

M4¼ 1=12 ^m2^l22þ 1=4 ^m2^l22þ mp^l22; b

N1¼  ^m2þ 2mp

 ^l1^l2_h1_h2sin h2

 1=2 ^m2þ 2mp

 ^l1^l2_h22sin h2; b

N2¼ 1=2 ^m2þ mp

 ^l1^l2_h1sin h2; b

G1¼ 1=2 ^m1^l1þ ^m2^l2þ mp^l1

 

gsin h1

þ 1=2 ^ m2^l2þ mp^l2

gsin hð 1þ h2Þ;

b

G2¼ 1=2 ^m2þ mp

 ^l2gsin hð 1þ h2Þ:

If the errors between M and M_, N and N_, G and G_are con- sidered, then the Eq. (7)can be rewritten as

MðhÞv þ N ðh; _hÞ þ GðhÞ þ e ¼ s

where e represents those errors. By using techniques of feedback linearization shown in Fig. 3 and using (1), we get the following linear system

MðhÞ€hþ N ðh; _hÞ þ GðhÞ ¼ MðhÞv þ N ðh; _hÞ þ GðhÞ þ e ) MðhÞ€h¼ MðhÞv þ e

) €h¼ v þ M1ðhÞe

where v is a sliding mode control that will be designed be- low. Moreover, let D = M1(h)e and the above equation becomes

€h¼ v þ D: ð8Þ

Note that the term D can be viewed as the uncertainty of system (8). Since less error can be achieved by using the proposed multi-crossover GA, the uncertainty D is bounded. Furthermore, the state Eq.(8) is

_x¼ Ax þ Bðv þ DÞ ð9Þ

where

x¼ x½ 1 x2 x3 x4T ¼ h1 _h1 h2 _h2

 T

;

0 1 0 0

0 0 0 0

0 0 0 1

0 0 0 0

2 66 66 64

3 77 77 75

; B¼ 0 0 1 0 0 0 0 1 2 66 66 64

3 77 77 75 :

It should be pointed out that by means of feedback linearization technique we do not need to take the inter- nal dynamic of system (1) into account (Slotine & Li, 1991). This indicates that if we can design a controller to stabilize system (9), it should also stabilize the structure of Fig. 3.

To overcome the bounded uncertainty of system (9), a sliding mode control v is designed to satisfy the control per- formance. Reference to the structure of Fig. 4, a desired reference signal yd2 R2is generated from

_xd¼ Adxdþ Bdyd yd¼ Cdxd

where Ad, Bd, and Cdare constant matrices with appropri- ate sizes. Furthermore, define the tracking error as

~

x x  yd and we have the following theorem.

Theorem 1. If we choose a sliding surface r¼ C~x ¼ r1 r2

½ T, where C2 R24is a given full row rank constant matrix, and define P p½ 1 p2T¼ CBD, then the sliding control law

v¼ ðCBÞ1½CAx CCdAdxd CCdBdud  ðCBÞ1Ksgn rð Þ ð10Þ where K = [kii] is a diagonal matrix and kii>j pij for i = 1, 2, will be such that the tracking error approaches zero, i.e.,

~

x! 0.proof: To complete this proof, we need to show that the controller output v forces r to zero in the finite time and then maintain the condition r = 0 for all further time.

Defining V ¼12rTras a Lyapunov function candidate, then we have V_ ¼ rTr_ with r_ ¼ C _~x ¼ C _x  _yð dÞ ¼ C Axþ½ B vð þ DÞ  CCdðAdxdþ BdudÞ. Moreover, by using (10), we have

r_ ¼ KsgnðrÞ þ P ¼ k11sgnðr1Þ þ p1

k22sgnðr2Þ þ p2

 

: Therefore, we get

d d d

d d d d d

x C y

u B x A x

= +

=

G N v

Mˆ + ˆ+ ˆ Mθ+N+G

( )

θ,θ

ud yd

τ

Fig. 4. Overall control system configuration of a two-link robot.

G N v

Mˆ + ˆ + ˆ τ Mθ+N+G

( )

θ,θ

Fig. 3. Structure of feedback linearization.

(5)

V_ ¼ rTr_ ¼ r1½k11sgnðr1Þ þ p1 þ r2½k22sgnðr2Þ þ p2 < 0;

ð11Þ since kii>jpij and

sgnðriÞ ¼ 1 if ri>0

1 if ri<0

for i = 1, 2. The inequality _V <0 ensures that if the trajec- tory happens to be on the manifold r = 0 at some time, it will be confined to that manifold for all further time be- cause leaving the manifold requires _V >0, which is impos- sible in view of the inequality. It also shows that ~x! 0 and, therefore, the angles of a two-link robot will track the ref- erence signal yd.

Remark 1. Since the matrix B in Eq. (9) is a full column rank matrix and if we choose the matrix C to be a full row rank matrix, then we can guarantee that the matrix CB is invertible. Therefore, an allowable control law can be obtained.

5. Simulation results

In this section, an illustrative example is given to demon- strate the feasibility of the proposed method. Consider a two-link robot system of (1) with the actual parameters l1= 0.5, l2= 0.5, m1= 3.24, m2= 2.16, and mp= 1. A desired reference output ydis given by

_xd ¼

14 40 0 0

1 0 0 0

0 0 14 40

0 0 1 0

2 66 64

3 77 75xdþ

1 0 0 0 0 1 0 0 2 66 64

3 77 75ud

yd¼

0 40 0 0

5 6 0 0

0 0 0 40

0 0 5 6

2 66 64

3 77 75xd;

with xd(0) = 0 and ud¼ 20uðtÞ½ 5 uðtÞT, where u(t) is the unit step function.

In the beginning, the proposed multi-crossover GA is applied to parameter identification of system (1) for [l1, l2, m1, m2]. For simulations, the sampling time is set to be 0.005, and both torque inputs s1and s2in(1)are gener- ated from the interval (1, 1) at random. The related vari- ables used in GA operations are given as follows:

½rl; ru ¼ ½0; 10; T ¼ 20; N ¼ 20; G¼ 3000;

pr¼ 0:2; pc¼ 0:4; pm¼ 0:1; s¼ 0:05:

All of initial chromosomes are randomly created from the searching interval. Each element of noise vector U in(6)is randomly chosen from [0.01, 0.01]. After performing our proposed GA method, we obtain the resulted system param- eters ^l1 ^l2 m^1 m^2

¼ 0:5½ 0:5 3:2399 2:16. Fur- thermore, to design a sliding model controller, we choose sliding surface as r¼ C~x with

C¼ 100 1 0 0

0 0 100 1

 

and K in(10)is given by K¼ 10 0

0 25

 

:

Note that it is easy to verify that

CB¼ 100 1 0 0

0 0 100 1

  0 0

1 0 0 0 0 1 2 66 64

3 77

75¼ 1 0 0 1

 

is nonsingular. Therefore, the control law of(10) is well- defined.

Fig. 5. Responses of h1(the solid line) and y1d(the dotted line); controller v1.

Fig. 6. Response of h2(the solid line) and y3d(the dotted line); controller v2.

(6)

According to Theorem 1, under the controller that we have been designed, output h of a two-link robot will track the desired output yd. Figs. 5 and 6 show the output responses and corresponding control laws. It can easily be observed that the reference signal yd can be fully tracked.

6. Conclusions

In this paper, we have demonstrated two basic design steps for a two-link robot control. First, a modified real- coded GA with a multiple-crossover is proposed and uses it to estimate the unknown system parameters. These parameters are viewed as genes and evolved by three genetic operations of reproduction, multiple-crossover, and mutation operations, respectively. Second, based on this resulted system model, it is incorporated to the feed- back linearization control such that the nonlinear robotic system can be transferred to a linear model with a nonlin- ear bounded time-varying uncertainty. Furthermore, in order to overcome the uncertainty term, a sliding mode control is designed and the stability of the closed-loop sys- tem is guaranteed by the use of the Lyapunov theorem.

Finally, a simulation example of two-link robot is given to demonstrate the effectiveness of the proposed method.

References

Angelov, P. P., & Buswell, R. A. (2003). Automatic generation of fuzzy rule-based models from data by genetic algorithms. Information Sciences, 150, 17–31.

Blanco, A., Delgado, M., & Pegalajar, M. C. (2001). A real-coded genetic algorithm for training recurrent neural networks. Neural Networks, 14, 93–105.

Carvalho, D. R., & Freitas, A. A. (2004). A hybrid decision tree/genetic algorithm method for data mining. Information Sciences, 163, 13–35.

Davis, L. (1991). Handbook of genetic algorithms. New York: Van Nostrand.

Deb, K., & Gulati, S. (2001). Design of truss-structures for minimum weight using genetic algorithms. Finite Elements in Analysis and Design, 37, 447–465.

Goldberg, D. E. (1989). Genetic algorithms in search. Optimization and machine learning. Reading, MA: Addison Wesley.

Golla, D. F., Garg, S. C., & Hughes, P. C. (1981). Linear state feedback control of manipulators. Mechanism and Machine Theory, 93–103.

Huang, Y. P., & Huang, C. H. (1997). Real-valued genetic algorithm for fuzzy grey prediction system. Fuzzy Sets and Systems, 87, 265–276.

Jiang, B., & Wang, B. W. (2000). Parameter estimation of nonlinear system based on genetic algorithm. Control Theory and Applications, 17, 150–152.

Kawaski, H., & Kato, N. (1991). A review of experiments on adaptive control and computed torque control by a robot with nonlinear reduction ratio feature. Journal of Robotics and Mechatronics, 356–359.

Khalil, H. K. (1996). Nonlinear systems (2nd ed.). New Jersey: Prentice- Hall.

Khatib, O., & Burdick, J. (1986). Motion and force control of robot manipulators. In Proceedings of IEEE international conference on robotics and automation (pp. 1381–1386).

Kristinsson, K., & Dumont, G. A. (1992). System identification and control using genetic algorithms. IEEE Transactions on Systems, Man, and Cybernetics, 22, 1033–1046.

Kuo, C. Y., & Wang, S. T. (1989). Nonlinear robust industrial robot control. ASME Journal of Dynamic Systems, Measurement, and Control, 24–30.

Lu, H. C., & Tzeng, S. T. (2000). Design of two-dimensional FIR digital filters for sampling structure conversion by genetic algorithm approach. Signal Processing, 80, 1445–1458.

Montiel Castillo, O., Melin, P., & Sepulveda, R. (2003). The evolutionary learning rule for system identification. Applied Soft Computing, 3, 343–352.

Montiel Castillo, O., Sepulveda, R., & Melin, P. (2004). Application of a breeder genetic algorithm for finite impulse filter optimization.

Information Sciences, 161, 139–158.

Muhlenbein, H. (1994). The breeder genetic algorithm – A provable optimal search algorithm and its application. In Proceedings of IEE colloquium on applications of genetic algorithms (pp. 5/1–5/3).

Muhlenbein, H., & Mahnig, Th. (2002). Evolutionary computation and Wright’s equation. Theoretical Computer Science, 287, 145–165.

Seraji, H. (1987). An approach to multivariable control of manipulators.

ASME Journal of Dynamic Systems, Measurement, and Control, 146–154.

Slotine, J.-J. E., & Li, W. (1991). Applied nonlinear control. New Jersey:

Prentice Hall.

Spong, M. W., & Vidyasagar, M. (1989). Robot dynamics and control. New York: Wiley.

Tang, Y. C., & Xu, Y. (2005). Application of fuzzy Naive Bayes and a real-valued genetic algorithm in identification of fuzzy model. Infor- mation Sciences, 169, 205–226.

Tsutsui, S., & Goldberg, D. E. (2001). Search space boundary extension method in real-coded genetic algorithm. Information Sciences, 133, 229–247.

Tzeng, S. T., & Lu, H. C. (2000). Complex genetic algorithm approach for designing equiripple complex FIR digital filters with weighting function. Signal Processing, 80, 197–204.

Xu, D. J., & Daley, M. L. (1995). Design of optimal filter using a parallel genetic algorithm. IEEE Transactions on Circuits and Systems-II:

Analog and Digital Signal Processing, 42, 673–675.

Zamparelli, M. (1997). Genetically trained cellular neural networks.

Neural Networks, 10, 1143–1151.

References

Related documents