﻿ Research Express@NCKU - Articles Digest (Volume 24 Issue 6) Velocity Field Construction for Contour Following Tasks Represented in NURBS Form Ming-Yang Cheng* and Ying-Hui Wang Department of Electrical Engineering, National Cheng Kung University mycheng@mail.ncku.edu.tw IEEE Transactions on Automatic Control, Vol. 54, No. 10, pp. 2405-2410, October 2009 INTRODUCTION Generally speaking, in multi-axis contour following tasks, reduction in tracking error does not guarantee that the contour error will also be reduced. To deal with this problem, Li and Horowitz proposed the Velocity Field Control (VFC) approach [1,2]. Since the constructed velocity field is a function of position only, the design of controllers can place emphasis on reducing contour errors. In general, a distance metric needs to be computed when constructing velocity fields. However, finding the corresponding distance metric for free form contours such as Non-Uniform Rational B-Splines (NURBS) is not trivial. In order to overcome this difficulty, this study exploits the idea of direction field theory. Both theoretic analysis and simulation results show that the proposed approach is indeed feasible. BRIEF INTRODUCTION TO VELOCITY FIELD CONTROL AND NURBS The key idea of VFC  is that a contour following task can be encoded using desired velocity fields. For a specific desired velocity V(q(t)), the α-related velocity error is defined as (1) where is the actual servomechanism velocity and α>0 is a constant. The aim of VFC is to make eα(t)→0 for some α. The general form of a parametric curve in a 2-D plane can be expressed, in terms of a free parameter 0≤u≤1, as . The 1-D NURBS can be represented parametrically by [3,4] (2) where Ci: control point; Wi: corresponding weight of Ci; (n+1): number of control points; k: order of NURBS. Recursive formulas for computing Ni,k(u) can be found in  as (3) (4) where [u0,…,um] represents the knot vector, m=n+k+1, and u is the interpolation parameter. VELOCITY FIELD CONSTRUCTION FOR CONTOUR REPRESENTED IN NURBS FORM In many motion control problems, the desired contour is represented in NURBS form. Therefore, there is a need to extend the VFC to the case of NURBS curves. When designing a velocity field that encodes a desired contour, it is crucial to determine an explicit formula that can be used to calculate the contour error in real time. The idea of direction field  is exploited to cope with this problem. A.        Brief Introduction to Direction Field Theory Without loss of generality, consider a 2×1 autonomous system with general form as: (5) Suppose R is the rectangle in the x-y plane given by a≤x≤b and c≤y≤d and (5) has an integral curve through each point of R. Clearly, the integral curve through each (x,y) in R has a tangent vector f(x,y). The short line segment through (x,y) with tangent vector f(x,y) is called a lineal element, and the whole collection of lineal elements is called the direction field of (5) . Without loss of generality, suppose R is a square, that is b-a=d-c. In addition, suppose there are N×N grid points in R and their coordinates are defined by (6) where h=(b-a)/N is the distance between two nearby grid points. For each grid point (xi,yi), one can draw a lineal element (with tangent vector f(xi,yi)) through it. Starting from the initial point (x(0),y(0)), a curve can be drawn along with the lineal element at the grid points. As h approaches zero, this curve will converge to the integral curve of the initial value problem: . B.        Proposed Approach for Velocity Field Construction The proposed approach computes the desired velocity at pre-selected grid points in an off-line manner. The idea is that if the desired velocity field is continuous and the grid points are dense enough, the associated desired velocities for the points other than these grid points can be approximated using an interpolation formula and the desired velocities of nearby grid points. To be more specific: 1). For the points located between two nearby grid points as shown in Fig. 2(a), their desired velocities are given by (7). (7) 2). For the points located inside a rectangle consisting of four grid points as shown in Fig. 2(b), their desired velocities are given by (8). (8) where , . C.        Theoretical Analysis of the Proposed Approach In this study, P(u) is assumed to be a C2 simple closed curve represented in parametric form. The major contributions of this study are stated in the following three theorems, in which the detailed proofs can be found in the original paper. Fig. 2. Desired velocity field (a). point (x,y) located between two nearby grid points. (b). point (x,y) located inside a rectangle consisting of four grid points. Theorem 1: For any given point q inside the rectangle R in the x-y plane (Fig. 3), one can define the velocity field at q as (9) where u is the parameter, Qq(u) represents the point on the desired contour P(u) that is closest to q, and q-Qq(u) is the distance vector; is the tangent vector of the desired feedrate at point Qq(u) and ζ>0 is a scaling constant. Then, both the components of velocity field in the x and y directions are continuous functions. Theorem 2: For any given point q(t) inside the rectangle R (Fig. 3), define the desired velocity field as (10) where is the point on P(u) that is closest to q(t). In addition, is the tangent vector of the desired feedrate at and ζ>0. Suppose both of the first partial derivatives of the components of V(q(t)) are C1 continuous at all points of R. If the system is under perfect control, i.e.  , then the velocity field V(q(t)) encodes P(u). Theorem 3: If the distance between two nearby grid points approaches zero, then the ω limit set of the trajectory encoded by the velocity field defined by (7) or (8) is the same as the ω limit set of the trajectory encoded by the velocity field defined by (9). The above three theorems indicate that the proposed velocity field construction approach can encode a C2 simple closed curve represented in parametric form. Fig. 3. Illustrative example of velocity field construction for contour represented in parametric form. Fig. 4. Blue line: 4-leaf clover contour represented in NURBS form; h: 2 mm.  Red line: trajectory encoded by velocity field; initial point (0,0) ILLUSTRATIVE EXAMPLE In the illustrative example, equation (11) is used to construct the velocity fields for the four-leaf clover contour represented in NURBS form. (11) Simulation results illustrated in Fig. 4 indicate that the proposed approach indeed is feasible. CONCLUSION To construct the velocity field for contours represented in NURBS form, this study exploits the idea of direction field to construct the velocity field at pre-selected grid points in an off-line manner. When used in real-time applications for the points other than the grid points, their associated velocity fields can be calculated using an interpolation formula and the velocity field information at nearby grid points. Subject to certain conditions, we have proved that the constructed velocity field encodes the desired contour. An illustrative example is given to demonstrate the feasibility of the proposed approach. REFERENCES  P. Y. Li and R. Horowitz, “Passive velocity field control of mechanical manipulators,” IEEE Trans. Robot. Automat., vol. 15, no. 4, pp. 751-763, Aug. 1999. P.Y. Li and R. Horowitz, “Passive velocity field control (PVFC): part II—application to contour following,”IEEE Trans. Automat. Contr., vol. 46, no. 9, pp. 1360-1371, Sept. 2001. L. Piegl, “On NURBS: a survey,” IEEE Comput. Graph. Appl., vol. 11, no. 1, pp. 55-71, Jan. 1991. M.Y. Cheng, M.C. Tsai, and J.C. Kuo, “Real-time NURBS command generators for CNC servo controllers,” Int. J. Mach. Tools Manuf., vol. 42, no. 7, pp. 801-813, May 2002. P. V. O’Neil, Advanced Engineering Mathematics, 5th edition, Thomson Learning, 2003.
 < Previous 