Visual Feedback Control of a Robot in an Unknown Environment (Learning Control Using Neural Networks)

In this paper, a visual feedback control approach based on neural networks is presented for a robot with a camera installed on its end-effector to trace an object in an unknown environment. First, the one-to-one mapping relations between the image feature domain of the object to the joint angle domain of the robot are derived. Second, a method is proposed to generate a desired trajectory of the robot by measuring the image feature parameters of the object. Third, a multilayer neural network is used for off-line learning of the mapping relations so as to produce on-line the reference inputs for the robot. Fourth, a learning controller based on a multilayer neural network is designed for realizing the visual feedback control of the robot. Last, the effectiveness of the present approach is verified by tracing a curved line using a 6-degrees-of-freedom robot with a CCD camera installed on its end-effector. The present approach does not necessitate the tedious calibration of the CCD camera and the complicated coordinate transformations.

era installed in its end-effecter. The main advantage of the present approach is that it does not necessitate the tedious CCD camera calibration and the complicated coordinate transformations.

Contact object
Robot end-effector Workspace frame CCD camera

Rigid tool
Tangential direction

A Trace Operation by a Robot
When a robot traces an object in an unknown environment, visual feedback is necessary for controlling the position and orientation of the robot in the tangential and normal directions of the operation environment. Figure 1 shows a robot with a CCD camera installed in its end-effecter. The CCD camera guides the end-effecter to trace a curved line from the initial position I to the target position G. Since the CCD camera is being fixed at the end-effecter, the CCD camera and the end-effecter always move together.

Visual feedback control
For the visual feedback control shown in Fig. 1, the trace error of the robot in the image feature domain needs to be mapped to the joint angle domain of the robot. That is, the end-effecter should trace the curved line according to where || · || is a norm, and e should be made into a minimum.
From the projection relation shown in Fig. 2, we know =ϕ( tc p ), where ϕ∈R 6×1 is a nonlinear mapping function which realizes the projection transformation from the workspace coordinate frame O to the image feature domain shown in Fig. 2.
It is assumed that p tc ∈R 6×1 is a position/orientation vector from the origin of the CCD camera coordinate frame C to the gravity center of j A . Linearizing Eq.
(2) at a minute domain of tc p yields where and p tc are minute increments of and p tc , respectively, and J f = p tc ∂∂ ∈R 6×6 is a feature sensitivity matrix. Furthermore, let and ∈R 6×1 are a joint angle vector of the robot and its minute increment in the robot base coordinate frame B . If we map from B to p tc in O using Jacobian matrix of the CCD camera J c ∈R 6×6 , we can get From Eqs. (3) and (4), we have Therefore, the necessary condition for realizing the mapping expressed by Eq. (5) is that (J f J c ) -1 must exist. Moreover, the number of the independent image feature parameters in the image feature domain (or the element numbers of ) must be equal to the degrees of freedom of the visual feedback control system.

Mapping relations between image features and joint angles
Because J f and J c are respectively linearized in the minute domains of p tc and , the motion of the robot is restricted to a minute joint angle domain, and Eq.(5) is not correct for large . Simultaneously, the mapping is weak to the change of (J f J c ) -1 . In addition, it is very difficult to calculate (J f J c ) -1 on line during the trace operation. Therefore, NN is introduced to learn such mapping.
Firstly, we consider the mapping from p tc in O to in the image feature domain. and tc p are increments of and tc p for the end-effecter to move from A j to A j+1 , respectively. As shown in Fig. 2, the mapping is depend on tc p , and the mapping can be expressed as where 1 ( )∈R 6×1 is a continuous nonlinear mapping function.We have from Eq.(6), where 2 ( )∈R 6×1 is a continuous nonlinear mapping function. When is uniquely specified in the image feature domain, there is a one-to-one mapping relationship between tc p and . Therefore, Eq.(7) is expressed as where 3 ( )∈R 6×1 is a continuous nonlinear mapping function.
Secondly, we consider the mapping from in B to c p in O . Let c p ∈R 6×1 be a position/ orientation vector of the origin of C with respect to the origin of O , and c p be increments of and c p for the end-effecter to move from A j to A j+1 , respectively. c p is dependent on as shown in Fig. 2, and we obtain from the forward kinematics of the CCD camera where ' 3 ( )∈R 6×1 is a continuous nonlinear mapping function.
Since the relative position and orientation between the end-effecter and the CCD camera are fixed, the mapping from c p to tc p is also one-to-one. We get where 4 ( )∈R 6×1 is a continuous nonlinear mapping function. Combining Eq.(9) and Eq.(10) gives where 5 ( )∈R 6×1 is a continuous nonlinear mapping function. It is known from Eq.(11.b) that if the CCD camera moves from A j to A j+1 , the robot has an unique .

Computation of image feature parameters
For 6 DOF visual feedback control, 6 independent image feature parameters are chosen to correspond to the 6 joint angles of the robot. An image feature parameter vector ) (1) The gravity center coordinates , (13.d) ( 3) The lengths of the main and minor axes of the equivalent ellipse im can be calculated for j=0,1,2 in Eq.(13.a)~(13.j).

Goal Trajectory Generation Using Image Feature Parameters
In this paper, a CCD camera is used to detect the image feature parameters of the curved line, which are used to generate on line the goal trajectory. The se-quences of trajectory generation are shown in Fig. 4. Firstly, the end-effecter is set to the central point of the window 0 in Fig. 4(a). At time t=0, the first image of the curved line is grasped and processed, and the image feature parameter vectors in the windows 0,1,2 are computed respectively. From time t=mT to t=2mT, the end-effecter is only moved by . At time t=mT, the second image of the curved line is grasped and processed, the image feature parameter vector

Off-line learning algorithm
In this section, a multilayer NN is introduced to learn 6 ( ). Figure 5 shows the structure of NN which includes the input level A, the hidden level B, C and the output level D. Let M, P, U, N be the neuron number of the levels A, B, C, D, respectively, g=1,2, ,M, l=1,2, ,P, j=1,2, ,U and i=1,2, ,N. Therefore, NN can be expressed as where is a real number which specifies the characteristics of ) (x f . The learning method of NN is shown in Fig. 6, and its evaluation function is defined as The present learning control system based on NN is shown Fig. 7. The initial AB gl w , BC lj w and CD ji w of NN are given by random real numbers between -0.5 and 0.5. When NN finishes learning, the reference joint angle where d∈R 6×1 is an output of NN when

On-line learning algorithm
For the visual feedback control system, a multilayer neural network NN c is introduced to compensate the nonlinear dynamics of the robot. The structure and definition of NN c is the same as NN, and its evaluation function is defined as where e(k)∈R 6×1 is an input vector of are the forward kinemics and Jacobian matrix of the end-effecter (or the rigid tool), respectively. Let be a position/orientation vector which is defined in O and corresponds to the tip of the rigid tool, we have The disturbance observer is used to compensate the disturbance torque vector ) (k ∈R 6×1 produced by the joint friction and gravity of the robot. The PID controller where P K , I K and D K ∈R 6×6 are diagonal matrices which are empirically determined.

Work sequence of the image processing system
The part circled by the dot line shown in Fig. 7 is an image processing system. The work sequence of the image processing system is shown in Fig. 8. At time t=imT, the CCD camera grasps a 256-grade gray image of the curved line, the image is binarizated, and the left and right terminals of the curved line are detected. Afterward, the image parameters Furthermore, in order to synchronize the image processing system and the robot joint control system, the 2nd-order holder

Synchronization of image processing system and robot control system
Generally, the sampling period of the image processing system is much longer than that of the robot control system. Because the sampling period of

Experiments
In order to verify the effectiveness of the present approach, the 6 DOF industrial robot is used to trace a curved line. In the experiment, the end-effecter (or the rigid tool) does not contact the curved line. Figure 9 shows the experimental setup. The PC-9821 Xv21 computer realizes the joint control of the robot. The Dell XPS R400 computer processes the images from the CCD camera. The robot hand grasps the rigid tool, which is regarded as the end-effecter of the robot. The diagonal elements of P K , I K and D K are shown in Table 1, the control parameters used in the experiments are listed in Table 2, and the weighting matrix W is set to be an unity matrix I. Figures 10 and 11 show the position responses (or the learning results of NN and NN c ) in the directions of x, y and z axes of O . Fig. 10 are teaching data. Figure 11 show the trace responses after the learning of NN c . Figure 12 shows the learning processes of NN and NN c as well as the trace errors. E f converges on 10 -9 rad 2 , the learning error E * shown in Fig. 12(b) is given by E * = where N=1000. After the 10 trials (10000 iterations) using NN c , E * converges on 7.6×10 -6 rad 2 , and the end-effecter can correctly trace the curved line. Figure 12(c) shows the trace errors of the end-effecter in x, y, z axis directions of O , and the maximum error is lower than 2 mm.

Conclusions
In this chapter, a visual feedback control approach based on neural network is presented for a robot with a camera installed on its end-effecter to trace an object in an unknown environment. Firstly, the necessary conditions for mapping the image features of the object to be traced to the joint angles of the robot are derived. Secondly, a method is proposed to generate a goal trajectory of the robot by measuring the image feature parameters of the object to be traced. Thirdly, a multilayer neural network is used to learn off-line the mapping in order to produce on line the reference inputs for controlling the robot. Fourthly, a multilayer neural network-based learning controller is designed for the compensation the nonlinear robotic dynamics. Lastly, the effectiveness of