Automatic generation of fuzzy rulebase for robot arm ... - IEEE Xplore

3 downloads 0 Views 488KB Size Report
Automatic Generation of Fuzzy Rulebase for Robot Arm Posture Selection. Stephen Chiu and J. John Cheng. Rockwell Science Center. 1049 Camino Dos Rios.
Automatic Generation of Fuzzy Rulebase for Robot Arm Posture Selection Stephen Chiu and J. John Cheng Rockwell Science Center 1049 Camino Dos Rios Thousand Oaks, CA 91360, USA

Abstract-When performing a manipulation task, through experience we place our arm in a posture which is best suited for performing that task. Although indices for quantifying the eptimality of robot arm postures with respect to task requirements have been formulated in the past, they have not been used in practice for posture selection. The primary reason for this lack of use is that finding the optimal posture according to these indices is a highly nonlinear, high dimensional optimization problem. There are many local minima that are dimcult to avoid unless the initial posture (i.e., initial conditions) is already near the true optimum; and there are no guidelines for choosing initial postures. Using a cluster estimation method, we have automatically generated a fuzzy rulebase for selecting the initial posture for a redundant robot arm. From 10,OOO training data relating arm posture to arm performance characteristics, 138 rules were generated. In essence, the rulebase is a database of 138 prototypical postures; each posture has a fuzzy range of performance characteristics. Given a set of desired performance characteristics (e.g., move fast in the x direction, exert high force in y direction) as the input to the rulebase, the degree of fulfillment of each rule is the degree to which the posture’s performance characteristics matches the task requirements. The posture with the highest degree of match is selected as the initial posture.

I. INTRODUCTION A manipulation task is usually specified in Cartesian task coordinates while a manipulator is controlled in its actuator coordinates, e.g. joint coordinates. When a manipulator is commanded to execute a motion or exert a specified force, the command must be transformed from the task coordinates to the actuator coordinates. For a given posture of a manipulator, there are “preferred directions” for motion and for force exertion in task coordinates. There will be directions of motion in task coordinates that require minimum motion in actuator coordinates, and directions of force exertion that require minimum loading on the actuators. This effect can be explained by viewing the manipulator as a multi-dimensional transformer of mechanical energy. The velocity and force at the arm joints are transformed into velocity and force at the hand. There are certain Cartesian directions in which the velocity is greatly amplified and certain directions in which the force is greatly amplified. The direction and amount of amplification are functions of the arm posture. These 0-7803-2125-1194 $4.000 1994 IEEE

principles also apply to human arms; we experience these principles when we notice it is “easier” to perform a certain task using a particular arm posture. For example, it requires much less effort to lift up a heavy object with the arm extended vertically than horizontally. Indices have been proposed to measure the optimality of an arm posture with respect to a set of task requirements [1,2,3]. In theory, we can use these indices to determine the optimal arm posture for a task, and thereby maximize the performance of an arm; however, this is computationally difficult in practice. The mathematical expressions for these indices generally contain high order polynomials of sines and cosines of the joint positions. Searching for the optimum solution in this highly nonlinear, high dimensional function is difficult. Unless the initial conditions (i.e., the initial posture) are chosen close to the optimum solution, the search usually leads to a local minimum that corresponds to an awkward posture [l]. Our goal is to develop a fuzzy rulebase that, given a set of task requirements, provides suggestions for the initial posture. To develop such a rulebase, we must obtain rules that describe prototypical performance capability-to-posture relationships, e.g., “if velocity in x direction is to be big & force in y direction is to be big & ..., then joint-1 should be big & joint-2 should be small ...”. The degree of matching between the task requirement and the antecedent of a rule would indicate the degree to which the corresponding posture is suited for the task. It is important to note that in this application we cannot interpolate the conclusion, since rules with similar degree of matching may offer widely different solutions (i.e., similar performance capability can be achieved through many widely different postures). We can simply select the posture with the highest degree of suitability, or we can select from among the postures with high suitability a posture that is closest to the current posture. Obtaining an appropriate set of rules from human intuition is difficult, particularly when the robot arm has complex kinematics as in the Robotics Research arm considered in this work (see Fig. 1; detailed description of the arm’s kinematics can be found in [4]). Initially we developed a graphical robot simulator that allows the user to interactively adjust the arm posture and see the numerical values of the corresponding performance capabilities. By using the simulator to explore various postures, we had hoped to obtain heuristics for

436

relating performance capabilities to postures. However, it was quickly realized that only a limited number of postures could be manually explored, and only limited patterns in the posture-capability relationships can be extracted by human perception. On the other hand, the rulebase must offer a sufficiently large selection of postures to cover the possible task requirements with sufficient resolution. As a result, we chose to automate the rule extraction process by iteratively generating posture-capability data for all possible postures and applying an efficient cluster estimation method to the data to extract the relationships. A set of 138 rules were extracted from 10,000 data points. In what follows, we describe the cluster estimation method and discuss the results in detail.

the actual data points; a grid point with many data points nearby will have a high potential value. The grid point with the highest potential value is chosen as the first cluster center. The key idea in this method is that once the first cluster center is chosen, the potential of all grid points are reduced according to their distance from the cluster center. Grid points near the first cluster center will have greatly reduced potential. The next cluster center is then placed at the grid point with the highest remaining potential value. This procedure of acquiring new cluster center and reducing the potential of surrounding grid points repeats until the potential of all grid points fall below a threshold. Although this method is simple and effective, the computation grows exponentially with the dimension of the problem. For example, a 7 dimensional clustering problem with each dimension having a resolution of 10 grid lines would result in lo7 grid points that must be evaluated. We have developed a modified form of the mountain method. We consider each data point, not a grid point, as a potential cluster center. Using this method, the number of effective “grid points” to be evaluated is simply equal to the number of data points, independent of the dimension of the problem. Another advantage of this method is that it eliminates the need to specify a grid resolution, in which trade-offs between accuracy and computational complexity must be considered. We have also improved the computational efficiency and robustness of the mountain method via other modifications. In [8], the modified mountain method was combined with linear least squares estimation to provide a fast and robust method for fuzzy model identification. For completeness, here we describe the modified mountain method.

Fig. 1. The 7 degrees-of-freedom Robotics Research arm.

II.CLUSTER ESTIMATION Clustering of numerical data forms the basis of many classification and system modeling algorithms. The purpose of clustering is to distill natural groupings of data from a large data set, producing a concise representation of a system’s behavior. In particular, the Fuzzy C-Means (FCM) clustering algorithm [5,6] has been widely studied and applied. The quality of the FCM solution, like that of most nonlinear optimization problems, depends strongly on the choice of initial values (i.e., the number of clusters and the initial cluster centers). Yager and Filev [7] proposed a simple and effective algorithm, called the mountain method, for estimating the number and initial location of cluster centers. The mountain method is based on griding the data space and computing a potential value for each grid point based on its distances to

Consider a collection of n data points xi,^,...,xn} in an M dimensional space. Without loss of generality, we assume that the data points have been normalized in each dimension so that their coordinate ranges in each dimension are equal; i.e., the data points are bounded by a hypercube. We consider each data point as a potential cluster center and define a measure of the potential of data point x i as

and r, is a positive constant. Thus, the measure of potential for a data point is a function of its distances to all other data points. A data point with many neighboring data points will have a high potential value. The constant r , is effectively the radius defining a neighborhood; data points outside this radius have little influence on the potential. We should note that in our application the measure of distance must take into

437

.

account the cyclic nature of the joint variables (i.e., joint angle of 2x “wraps around” to 0). Hence, when computing the distance along a dimension of the joint space, the distance is the lesser of the Euclidean distance and 2x minus the Euclidean distance. After the potential of every data point has been computed, we select the data point with the highest potential as the first cluster center. Let x; be the location of the first cluster center and PT be its potential value. We then revise the potential of each data point xi by the formula

criteria for acceptindrejecting cluster centers. We use the following criteria: ifPl>ZPP; Accept as a cluster center and continue. else if P: e g P; Reject x; and end the clustering process. else Let dmin= shortest of the distances between x i and all previously found cluster centers.

xi

(3)

I

Accept x i as a cluster center and continue. where

P= 4

G

and rb is a positive constant. Thus, we subtract an amount of potential from each data point as a function of its distance from the first cluster center. The data points near the first cluster center will have greatly reduced potential, and therefore will unlikely be selected as the next cluster center. The constant q, is effectively the radius defining the neighborhood which will have measurable reductions in potential. To avoid obtaining closely spaced cluster centers, we set rb to be somewhat greater than r, ; a good choice is 5 = 1.5 r, . When the potential of all data points have been revised according to Eq. (3), we select the data point with the highest remaining potential as the second cluster center. We then further reduce the potential of each data point according to their distance to the second cluster center. In general, after the k’th cluster center has been obtained, we revise the potential of each data point by the formula

wherex; is the location of the k’th cluster center and p*k is its potential value. In the original mountain method, the process of acquiring new cluster center and revising potentials repeats until

P;

< EP;

where E is a small fraction, The choice of E is an important factor affecting the results; if E is too large, too few data points will be accepted as cluster centers; if E is too small, too many cluster centers will be generated. We have found it difficult to establish a single value for E that works well for all data patterns, and have therefore developed additional

else

xl

and set the potential at x i to 0. Reject Select the data point with the next highest potential as the new x i and re-test. end if end if Here Z specifies a threshold for the potential above which we will definitely accept the data point as a cluster center; E specifies a threshold below which we will definitely reject the data point. We use Z = 0.5 and E = 0.15 . If the potential falls in the gray region, we check if the data point provides a good trade-off between having a sufficient potential and being sufficiently far from existing cluster centers.

III. ARMPOSTURE SELECTION It was shown in [2] that the critical factors in matching the capability of a robot arm to task requirements are the veZocity and force transmission ratios along the task directions. These ratios indicate the degree to which motion and force at the joints are amplified into motion and force along a given Cartesian direction. We cannot simply select postures that either maximize velocity or force amplification along a task direction, because velocity and force amplifications are inversely related. For a posture that allows the arm to move with high speed in a particular direction, that posture will not allow the arm to exert high force along the same direction. Conversely, a posture that allows the arm to exert a high force along a particular direction will not allow the arm to move with high speed along that same direction. Hence, velocity amplification must be obtained at the expense of force amplification, and vice versa. This behavior makes sense when we view the arm as a transformer of mechanical energy; conservation of power requires that increases in velocity amplification (or current amplification in electrical analogy) be obtained at the expense of reduced force amplification (or voltage amplification in electrical analogy).

In posture optimization, one must aim for a compromise between velocity and force capabilities [2]. Because of the inverse relationship between velocity and force amplification, it suffices to specify either a desired velocity transmission ratio or a desired force transmission ratio. Here we have chosen to use velocity transmission ratio because its values are well bounded, while the force transmission ratio can become infinite (theoretically, when an arm is in a “singular” posture, it loses the ability to move in a particular direction but can support infinite force in that direction). As shown in [l], the velocity transmission ratio v along a particular Cartesian direction is computed by

where J is the Jacobian matrix that contains posturedependent partial derivatives of the arm’s endpoint Cartesian positions with respect to the arm’s joint positions, and U is a unit vector in the Cartesian direction of interest. Each training data point for extracting posture-capability relations consists of the joint positions of a posture and the resultant velocity transmission ratios along the Cartesian x, y, and z directions. Our approach is to iterate over all possible postures to create a complete data set and then apply the aforementioned clustering technique to reduce the data to a smaller set of rules that capture the relationships in the data set. For the 7 degrees-of-freedom Robotics Research arm, coarsely discretizing each joint variable into 10 increments for the purpose of generating all possible postures would result in lo7 postures. We constrain our problem to finding postures that optimize translational motion and force capabilities (excluding rotational motion and force). Considering the kinematics of the arm as shown in Fig. 1, we see that translational manipulation is primarily effected by joints #1, #2, #3, and #4; hence the position of the other joints can be ignored for simplification. This reduces the number of possible postures, and hence the number of posture-capability data points, to lo4. Because 4 joint variables are used to define a posture and there are 3 velocity transmission ratios associated with each posture, this results in a 7 dimensional clustering problem with 104 data points. Using r , = 0.333, a set of 138 cluster centers were found. Decreasing r, to 0.25 resulted in 689 cluster centers, which is an unwieldy size for real-time posture selectio: from both computation and memory standpoints. We translated the 138 clusters into rules via the following procedure. Consider a set of c cluster centers {xF,xz ,...,x : } in a 7 dimensional space. Let the first 3 dimensions correspond to the velocity transmission ratio space and the last 4 dimensions correspond to the joint position space. We decompose each vector x: into two component vectors and z: ,where y ; contains the 3 coordinates of the cluster center in velocity transmission ratio space and :z. contains the 4 coordinates of the cluster center in joint position space.

2

We consider each cluster center x; as a fuzzy rule that describes a capability-posture relationship. Given an input vector y of desired velocity transmission ratios for a task,the degree to which rule i is fulfilled is defined as

pi =

e-a IIy

- y i* II2

(4)

where a is the constant defined by Eq. (2). The degree of fulfillment indicates the degree to which the posture given by z: matches the task requirements. We can view this computational model in terms of a fuzzy inference system employing traditional fuzzy if-then rules. Each rule has the following form: if v, is A, & vy is Ay & joint2 is B2 ...

V,

is

4 then joint1

is B 1 &

where A’s are exponential membership functions of the velocity transmission ratios and B‘s are singletons. Our computational scheme is equivalent to an inference method that uses multiplication as the AND operator. When using the rulebase, the user simply specifies the desired velocity transmission ratios in the x, y, and z directions. For example, if the task requires the arm to move with high speed in the x direction and exert high force in the y direction, the user would specify a large velocity transmission ratio for the x direction and a small velocity transmission ratio for the y direction. The user do not need to specify the desired velocity transmission ratios for all 3 directions; the missing velocity transmission ratio can be easily ignored during the matching process by ignoring the corresponding dimension when computing the distance in Eq. 4. The postures corresponding to rules with high degree of fulfillment are all good candidates for the initial posture. Here we simply select the posture corresponding to the rule with the highest degree of fulfillment. When operating the arm, a more appropriate strategy is to select from among good candidate postures a posture that places the hand nearest to the desired hand position. When the degree of fulfillment of all rules are low, it is an indication that the desired combination of velocity transmission ratios cannot be achieved. The rulebase was tested by applying as input the actual velocity transmission ratios from the training data. The joint positions and velocity transmission ratios of the selected posture are compared against that of the actual posture which generated the input. The average distance between the selected posture and the actual posture was 3.2 radians in the 4-dimensional joint space. This disparity can be reduced partly by using a smaller r, for the clustering process, thus generating more rules/postures to provide finer coverage of the joint space. However, the main cause of this disparity is the fact that many widely different postures have similar velocity transmission characteristics. For example, if we consider as candidate postures those that have a degree of

439

fulfillment greater than 0.8 times the highest degree of fulfillment, then on the average there are 5 candidate postures for each input pattern of desired velocity transmission ratios. Therefore, the selected posture will usually bear no relation to the actual posture that generated the velocity transmission ratios. The average distance between the velocity transmission ratio of the selected posture and that of the actual posture was 3.4 (i.e., distance in the 3-dimensional velocity transmission ratio space). Considering that the velocity transmission ratios have a range of 0 to 40 in each of the 3 dimensions, this difference is quite small. We can conclude that the rulebase is able to provide a good initial posture with the desired velocity transmission characteristics. The resultant rulebase is not optimal in any sense. Because the problem domain involves a one-to-many mapping (one velocity transmission pattern can map into many disparate, equally valid postures), it is difficult to formulate an appropriate criterion for optimizing the rulebase’s inputloutput mapping. An alternative is to optimize the rulebase with respect to cluster separation criteria (e.g., by using the FCM optimization procedure), not with respect to input/output mapping error. However, there is no reason to believe such optimization would bring the selected postures any closer to the optimal postures. For all practical purposes, the inputloutput mapping accuracy of the rulebase is not crucial, because the function of the rulebase is only to provide an approximate posture from which an optimal posture can be reached by gradient descent search.

IV.CONCLUSION

REFERENCES

[l]

S. Chiu, “Task compatibility of manipulator postures,” Int. J. of Robotics Research, Vol. 7 5 , 1988, pp. 13-21.

[2]

S. Chiu, “Kinematic characterization of manipulators: an approach to defining optimality,” Proc. IEEE Int. Conf. on Robotics and Automation, Philadelphia, PA, April 1988, pp. 828-833.

[3] Z. Li and S . Sastry,“Task oriented optimal grasping by multifingered robot hands,” IEEE J. of Robotics and Automation, Vol. RA 2: 14, 1988. [4] H. Seraji, M. Long, and T. Lee, “Motion control of 7DOF arms: the configuration control approach,” IEEE Trans. on Robotics and Automation, Vol. 9:2, April 1993. [5] J. Dunn, “A fuzzy relative of the ISODATA process and its use in detecting compact, well separated clusters,” J. cybernetics, vol. 3, no. 3, pp. 32-57, 1974. [6] J. Bezdek, “Cluster validity with fuzzy sets,” J. Cybernetics, vol. 3, no. 3, pp. 58-71, 1974.

[A

R. Yager and D. Filev, “Approximate clustering via the mountain method,” Iona College Tech. Report #MU1305, 1992. Also to appear in IEEE Trans. on Systems, Man & Cybernetics.

[8]

S. Chiu, “Fuzzy model identification based on cluster estimation,” J. of Intelligent and Fuzzy Systems, Vol. 2:3, 1994.

We have applied a cluster estimation method to automatically extract rules for robot arm posture selection. The selected posture provides a good starting point from which to further refine the posture through gradient descent search. The same technique may be applied to select initial conditions for other nonlinear optimization problems that have a frequently changing optimization criteria.

ACKNOWLEDGMENT Funding for this work was provided by NASA Langley Research Center under contract #NASl-19243. The authors thank Francis Siu for generating the training data for clustering.

440

Suggest Documents