Generating Commands for Parametric Curve Motion Using Buffered DDA

Similar documents
OMNI Interpolator for High-performance Motion Control System Part I: Algorithm of Interpolator

The Acceleration/Deceleration Control Algorithm Based on Trapezoid-Curve Jerk in CNC Machining

Accurate Trajectory Control for Five-Axis Tool-Path Planning

The Acceleration/Deceleration Control Algorithm Based on Trapezoid-Curve Jerk in CNC Machining

Cutting Force Simulation of Machining with Nose Radius Tools

REAL TIME TRAJECTORY GENERATION AND INTERPOLATION. Anthony Siu. B.A.Sc. University of British Columbia, 2009 A THESIS SUBMITTED IN PARTIAL FULFILLMENT

A METHOD OF REAL-TIME NURBS INTERPOLATION WITH CONFINED CHORD ERROR FOR CNC SYSTEMS

Approximation of 3D-Parametric Functions by Bicubic B-spline Functions

Multipatched B-Spline Surfaces and Automatic Rough Cut Path Generation

Mathematical Model and Surface Deviation of Cylindrical Gears With Curvilinear Shaped Teeth Cut by a Hob Cutter

Developing an Approach to Redesign Freeform Surfaces Using B-Spline Technique

Improved DDA Algorithm and FPGA Implementation Yi-Xuan WANG a, Quan-Gang WEN b, He YIN c, Zhi-Gang HAO, Xin-Zheng DONG

The Journal of MacroTrends in Technology and Innovation

Time-Optimal Interpolation of CNC Machines along Parametric Path with Chord Error and Tangential Acceleration Bounds

Knot Insertion and Reparametrization of Interval B-spline Curves

MACHINING OF ARCHIMEDEAN SPIRAL BY PARAMETRIC PROGRAMMING

An introduction to NURBS

Efficient Algorithm for Time-optimal Feedrate Planning and Smoothing with Confined Chord Error and Acceleration

Design on Odd-even Steps Third Order Approach Interpolation Algorithm for Logarithmic Curve

SPEED CONTROL IN NUMERIC CONTROLLED SYSTEMS

Evaluating the knot vector to synthesize the cam motion using NURBS

PSO based feedrate optimization with contour error constraints for NURBS toolpaths

UNSTRUCTURED GRIDS ON NURBS SURFACES. The surface grid can be generated either in a parameter. surfaces. Generating grids in a parameter space is

Arc-Length Parameterized NURBS Tool Path Generation and Velocity Profile Planning for Accurate 3-Axis Curve Milling

Flank Millable Surface Design with Conical and Barrel Tools

Integration of a 5-axis Spline Interpolation Controller in an Open CNC System

A New Approach to Computation of Curvature Scale Space Image for Shape Similarity Retrieval

Chapter 2 A Second-Order Algorithm for Curve Parallel Projection on Parametric Surfaces

Free-form curve design by knot alteration

Design optimization method for Francis turbine

Artificial Neural Network-Based Prediction of Human Posture

Note on Industrial Applications of Hu s Surface Extension Algorithm

Design of Cam Profile using Higher Order B-Spline

interpolation method for the open CNC system is

SUBDIVISION ALGORITHMS FOR MOTION DESIGN BASED ON HOMOLOGOUS POINTS

COMPUTER AIDED GEOMETRIC DESIGN. Thomas W. Sederberg

Fall CSCI 420: Computer Graphics. 4.2 Splines. Hao Li.

Reference-Pulse Circular Interpolators for CMC Systems

Automatic Ultrasonic Testing for Components with Complex Surfaces

Progressive Surface Modeling Based On 3D Motion Sketch

The speed-controlled interpolator for machining parametric curves

PS Geometric Modeling Homework Assignment Sheet I (Due 20-Oct-2017)

A NURBS-BASED APPROACH FOR SHAPE AND TOPOLOGY OPTIMIZATION OF FLOW DOMAINS

NURBS: Non-Uniform Rational B-Splines AUI Course Denbigh Starkey

Interpolator. Chapter Introduction

Real-Time 3D Tool Path Generation for Numerical Control

CHAPTER 6 Parametric Spline Curves

Surface Roughness Control Based on Digital Copy Milling Concept to Achieve Autonomous Milling Operation

Set 5, Total points: 100 Issued: week of

COORDINATE MEASUREMENTS OF COMPLEX-SHAPE SURFACES

DEVELOPMENT OF GEOMETRICAL MODELS OF HARD-ALPHA INCLUSIONS

Position-Control Module for MICREX-SX Series

The development of a laser array measurement system for three dimensional positioning testing in machine tool

Lecture 2.2 Cubic Splines

CNC Milling Machines Advanced Cutting Strategies for Forging Die Manufacturing

Bayesian Background Estimation

Visualization and Analysis of Inverse Kinematics Algorithms Using Performance Metric Maps

Adaptive osculatory rational interpolation for image processing

Important Properties of B-spline Basis Functions

Trajectory Planning of Redundant Planar Mechanisms for Reducing Task Completion Duration

Chapter 1 Introduction to Numerically Controlled Machines

A Study on Evaluation of Conceptual Designs of Machine tools

Rational Bezier Curves

MODELLING AND MOTION ANALYSIS OF FIVE-BAR 5R MECHANISM

manufactured parts carry good precision, excellent surface precision and high flexibility. This Baan-Chyan, Taipei, Taiwan, 220, R.O.C.

A New Class of Quasi-Cubic Trigonometric Bezier Curve and Surfaces

Elastic Bands: Connecting Path Planning and Control

Incomplete mesh offset for NC machining

MACHINE TOOL CONTROL SYSTEMS AND INTERPOLATIONS OF SPLINE TYPE

2) For any triangle edge not on the boundary, there is exactly one neighboring

1.2 Numerical Solutions of Flow Problems

Operation Trajectory Control of Industrial Robots Based on Motion Simulation

Surface Representation as a Boundaryvalued

Design and research of CNC platform based on CAN bus

Inverse Kinematics of Cable Driven Parallel Robot.

Parametric curves. Brian Curless CSE 457 Spring 2016

Performance analysis of cross coupled controllers for CNC machines based upon precise real time contour error measurement

Efficient Degree Elevation and Knot Insertion for B-spline Curves using Derivatives

Goals: Course Unit: Describing Moving Objects Different Ways of Representing Functions Vector-valued Functions, or Parametric Curves

Coarse-to-Fine Search Technique to Detect Circles in Images

Handout 4 - Interpolation Examples

Surface roughness parameters determination model in machining with the use of design and visualization technologies

To Do. Resources. Algorithm Outline. Simplifications. Advanced Computer Graphics (Spring 2013) Surface Simplification: Goals (Garland)

CIRCULAR INTERPOLATION COMMANDS

A Precision Grinding Technique for Radome Inner Surfaces. Z.Y. Jia, T. Ji, D.M. Guo and G.H. Bian

Les Piegl Wayne Tiller. The NURBS Book. Second Edition with 334 Figures in 578 Parts. A) Springer

Bézier Splines. B-Splines. B-Splines. CS 475 / CS 675 Computer Graphics. Lecture 14 : Modelling Curves 3 B-Splines. n i t i 1 t n i. J n,i.

Improvement of Computer-Aided Manufacturing (CAM) Software for Laser Machining

Automated Drill Design Software

Computer Numerical Control System for Automatic Surface Machining. Chen Zuo Yue, Wang Xiao E, Yang Mei

Journal of Advanced Mechanical Design, Systems, and Manufacturing

Output Primitives Lecture: 4. Lecture 4

A Geometry-Based Motion Planner for Direct Machining and Control

Optimization of Process Parameters for Wire Electrical Discharge Machining of High Speed Steel using Response Surface Methodology

Splines. Parameterization of a Curve. Curve Representations. Roller coaster. What Do We Need From Curves in Computer Graphics? Modeling Complex Shapes

Computer Aided Engineering Applications 3. Advanced Manufacturing 3.5 NC programming 3.6 Automated Manufacturing systems 3.7 Rapid prototyping

Chapter 6. Computer Implementations and Examples

Output Primitives. Dr. S.M. Malaek. Assistant: M. Younesi

Background for Surface Integration

CURVILINEAR MESH GENERATION IN 3D

Transcription:

785 Generating Commands for Parametric Curve Motion Using Buffered DDA Yih-Fang CHANG Abuffered digital differential analyzer (DDA) algorithm in a computerized numerical controller (CNC), interpolating more than one segment in a sampling interval, maintains the speed of motion, according to the programmed feed. The DDA interpolates sequential position data, where the gaps between pairs of data are variable, using a fixed increment of a parameter constrained by the required accuracy of the chord of the motion. Without considering the time function of the parameter specified by two terms of a Taylor expansion, the algorithm determines the suitable position from the interpolated position data, to ensure the accuracy of the both speed and contour of motion. A parametric curve, determined by the non-uniform rational B-spline (NURBS), is employed to verify the improvements in curve motion. Key Words: Parametric Curve, NURBS, CNC, Command Control, Digital Differential Analyzers, Buffer Storage, Interpolation, Computer Architecture, Machining 1. Introduction Complex curves and surfaces have been generated and manipulated in parametric form in computer-aided design (CAD) for over two decades. Many works have presented flexible definitions of curves and surfaces and facilitated the manipulation of shapes in CAD (1) (4). Computer-aided manufacturing (CAM) software converts the shape, defined parametrically, to be machined on a computerized numerically controlled machine tool is converted into sequential linear segments, because interpolators in a conventional computerized numerical controller (CNC) cannot interpolate parametric curves. When an accurate curve is required, the segments are made short to reduce the chord error. However, the actual speed can not reach the specified values for the feed because of deceleration at the end of the segments (5), (6).The distance moved during the final interpolation in a sampling interval is usually less than that in the preceding interpolation. The actual speed during the final interpolation of a segment is thus smaller than the prescribed value. Increasing the number of the short segments along a curve coarsens tremendously reducing the mean speed. Received 17th July, 2004 (No. 04-5117) Department of Mechanical and Automation Engineering, Dayeh University, 112 Shan-Jiau Rd. Da-Tsuen, Changhua, Taiwan 515, R.O.C. E-mail: yfchang@mail.dyu.edu.tw The interpolator defined in parametric form, used to generate the position commands, must be installed in the CNC to reduce the number of segments. Chou et al. and Huang et al. (7), (8) presented the moving time function of the parameter to yield an interpolator of a parametric curve. Their work contributed significantly to understanding the relationship between the parametric function and the speed of motion. However, determining the parameter when working in CNC is very time-consuming. The discrete form of the parameter in relation to the desired feed rate, approximating using Taylor s expansion enabled calculations to be made quickly when the motion is being controlled (5), (6). A real-time interpolator depends on only the first two derivatives of Taylor s expansion. Following these studies, the speed of non-uniform rational B-spline (NURBS) motion was made highly accurate by a corrective method (9), (10). The speed declines to suit the curvature, to ensure a low chord error during the motion (11), (12). Some advanced commercialized CNCs, with realtime parametric interpolators, have been developed. However, high-performance hardware is required to implement the complex computation and segmentation process. The traditional interpolator and the segment process in a simple CNC are well developed. This work seeks to use such technology to improve the motion along a parametric curve. This work presents a simple control algorithm for a CNC, called buffered DDA, to give commands along a

786 sequence of line segments that have been generated by a CAM system according to a specified contour. The new control algorithm, rapidly interpolating and using a memory buffer, reveals that a common digital differential analyzer (DDA) programmed outside the interrupt service routine (ISR) can continuously interpolate more than one segment (block) in a sampling interval, when the programmed lengths of continuous segments are very short. During interpolation by a DDA, the number of steps in the interpolation equals the length of the arc in basic length units (BLUs) (13), (14). The ISR chooses the suitable position commands, which are saved in a buffer (memory) by the DDA in the main program, to suit the required feed rate in BLUs/ms. The control algorithm of the simple CNC maintains the high programmed velocities even when the programmed lengths of continuous segments are very short. The generation algorithm is used to maintain the speed along the parametric curve, which is generated by a fixed increment of the parameter u constrained by the chord error. When Taylor s expansion (5), (6) is not used to determine the increments of the parameter, the chord error and the speed error are typically verified using the NURBS example (4), (9), (11). 2. Traditional Parametric Curve Motion In a CAM system, a non-uniform rational B-spline (NURBS) generation algorithm can generate points A(u) along a three-dimensional curve: Ā(u) = A x (u) X + A y (u)ȳ + A z (u) Z (1) according to the following formula (3), (4), (10) ; A(u) = n i=0 n i=0 W i N i,k (u)c i W i N i,k (u) 1 for ui u u N i,1 (u) = i+1 (3) 0 otherwise N i,k (u) = u u i N i,k 1 (u)+ u i+k u N i+1,k 1 (u) u i+k 1 u i u i+k u i+1 (4) where C i represent the control points; W i are the corresponding weights of C I ; n + 1 is the number of control points; [u 0,...,u n+k ] is the knot vector; k is the order of NURBS, and u is the interpolation parameter. According to Eqs. (2) to (4) and the maximum chord height error, the computer-aided-manufacturing (CAM) software yields the end points (A x (u),a y (u),a z (u)) of the segments along the curve from the discrete form of the parameter u; (2) Fig. 1 Machining system for a traditional CNC that is, u(m) = u(m 1)+ u (5) where m represents the number of times of the NURBS interpolation. When the chord height errors exceeded this maximum, the increment u in Eq. (5) must be reduced. After the part program from the CAM system, as shown in Fig. 1, is received, the computerized numerical controller (CNC) interpolates these points by applying a referenceword interpolation algorithm (15) in the interrupt service routine (ISR). An external timer enables the ISR. The position control is also executed once according to the result of the interpolation. When the segment processor in MAIN receives the ends of a segment, given by A(u(m 1)) and A(u(m)), as shown in Fig. 2, the points interpolated along the segment are obtained by, l x a x (t) = a x (t 1)+ f r (6) l l y a y (t) = a y (t 1)+ f r (7) l l z a z (t) = a z (t 1)+ f r (8) l where f r is the prescribed feed rate, which is also p/ t, which is the distance p through which the motion moves within a sampling period t. l x, l y and l z represents the lengths of the projection of the segment onto each axis; l x = A x (u(m)) A x (u(m 1)) (9) l y = A y (u(m)) A y (u(m 1)) (10) l z = A z (u(m)) A z (u(m 1)) (11) The symbol l expresses the length of the segment, as indicated as below. l = A(u(m 1))A(u(m)) (12) = (A x (u(m)) A x (u(m 1))) 2 +(A y (u(m)) A y (u(m 1))) 2 +(A z (u(m)) A z (u(m 1))) 2 Series C, Vol. 48, No. 4, 2005 JSME International Journal

787 Fig. 2 Traditional curve machining using reference-word interpolation The basic concept of DDA is similar to that specified by Eqs. (6) (8), except in that the applied speed is always less than 1BLU/ t. All variables are integers to simplify the calculation and reduce the computation time. The results of Eqs. (6) (8) can be rewritten as, a x (t) = t l x (13) i=1 l/ f r a y (t) = t l y (14) i=1 l/ f r a z (t) = t l z (15) i=1 l/ f r where i is the number of times the interpolation is performed. The above equations are calculated using a simple algorithm, such as the add and compare algorithm. ax (t 1) if q a x (t) = x (t) = q x (t 1)+l x < l/ f r a x (t 1)+1 if q x (t) = q x (t 1)+l x l/ f r (16) ay (t 1) if q a y (t) = y (t) = q y (t 1)+l y < l/ f r a y (t 1)+1 ifq y (t) = q y (t 1)+l y l/ f r (17) Fig. 3 Timing of the executing sequence in a control program of a traditional CNC The right terms in Eqs. (6) (8), the multiplication of the feed rate and the unit vectors on each axis, express the distance moved along every axis in a sampling period. As shown in Fig. 2, the interpolator produces the sequential positions a(t) according to Eqs. (6) to (8). The distance between the points produced in the final two interpolations, a(t last )anda(t last 1), is normally smaller than that between the previous pair of contiguous points, such that deceleration occurs in the final interpolation. The increment of the parameter, u, should be reduced and the number of segments increased to ensure the high accuracy of the contour performed by the segments. When each segment is very short, such that A(u(m 1))A(u(m)) < p, the actual distance moved during a sampling interval cannot exceed the length of the segment. Therefore, the actual speed A(u(m 1))A(u(m))/ t cannot exceed the prescribed feed rate f r, because only a segment and an ISR can be processed in a sampling period t, as shown in Fig. 3. The largest problem concerns how to process more than one segment and interpolate separate segments in a sampling period. 3. Buffered DDA Control Algorithm The time required for the computation is short if more than one interpolation must be executed within a sampling period. The time for computing the reference-pulse interpolation, such as for a digital differential analyzer (DDA), is very short (14), yielding the required short computing period. az (t 1) if q a z (t) = z (t) = q z (t 1)+l z < l/ f r a z (t 1)+1 if q z (t) = q z (t 1)+l z l/ f r (18) where registers q x (t), q y (t)andq z (t), with length l/ f r,must be reset as follows, during the fullness of the content. q x (t) = q y (t) = q z (t) = q x (t) q x (t) l/ f r q y (t) q y (t) l/ f r q z (t) q z (t) l/ f r if if if q x (t) < l/ f r q x (t) l/ f r (19) q y (t) < l/ f r q y (t) l/ f r (20) q z (t) < l/ f r q z (t) l/ f r (21) When the speed f r must be low, the lengths of the registers, l/ f r, are large. More interpolations are required to increase the values of the position commands a x (t), a y (t)and a z (t). When a large speed f r is sought, the lengths of these registers must be set to under the segment length l. The resulting increments of the position commands a x (t), a y (t) and a z (t) will exceed unity in a sampling period, so more comparisons must be made using Eqs. (16) (18). The total computation time is long and unknown when the speed must be high. A fixed sampling time is not guaranteed. Therefore, DDA is normally applied for interpolating a curve with a speed of under 1BLU/ t. The speed can be increased to a high value using high-performance hardware. In this work, the DDA is also employed to generate commands along the curve because the computation time of the algorithm is short and the number of the interpolations is accurate. The large increments in the reference inputs of the position control loops, as in reference-word interpolation (15) for producing high-speed motion are also required.

788 Fig. 4 Concept of generating buffered commands The commands in ISR required by the position control loops depend on the actual speed; they are parts of the commands prepared by DDA in MAIN. When the commands generated by DDA according to the speed f r equal 1BLU/ t arestoredinthebuffer (memory), the offset between the starting address and the ending address of the buffer equals the length of the interpolated segment. Hence, the required commands for the position control can be pulled from the buffer using searching the index (address) of the memory, as shown in Fig. 4. The generating speed of the DDA should be sufficiently high to prepare these commands prior to they are used in ISR; otherwise the commands that are pulled from the buffer do not suffice. The maximal feed rate is constrained by the allowable amount number of the commands that can be generated by DDA in a sampling interval. When the CNC processes a set of parameter of segment (called a block), such as a G01 in a part program, the DDA in the MAIN begins to interpolate the straight-lined segment, as described above. The DDA generates sequential commands in 1BLU/ t and pushesthem into the buffer without being constrained by the interrupt period, as indicated by the hollow circles in Fig. 4. The memory index (address) can be expressed as a count of interpolations. An external timer frequently triggers the ISR at a fixed frequency as depicted in Fig. 5. After the speed f r is obtained by the feed filter, the ISR skips several stored commands and extracts only the suitable ones, R x, R y and R z (the black circles in Fig. 4) from the buffer, as reference inputs to the position controllers, r x, r y and r z. The reference inputs are also compensated for increasing the accuracy of the pitch. These commands are saved in a circular buffer (or queue), according to the fraction of the buffer that is empty, to shorten the memory into which DDA must store the commands. ISR pulls the required position commands from the buffer in each interrupt. The program, MAIN, processes many segments (blocks) in a single interrupt interval, whenever the segments are very short, since DDA repeatedly interpolates the segment in the program MAIN until the buffer is full. Figure 6 presents the sharing of time between MAIN and the ISR, where T m represents the computation time of Series C, Vol. 48, No. 4, 2005 Fig. 6 Fig. 5 Buffered DDA software structure Timing of the executing sequence of the buffered DDA control program DDA; T b represents the time taken to process a segment, and τ represents the time taken by the ISR. After T b,the number of times that DDA is executed is determined by the length of the segment. The ISR pulls the required buffered commands according to the programmed speed, f r BLUs/ t, so the resulting speed, which corresponds to the offset of the buffer in a single interrupt interval can be maintained. The speed at the end of the segment can also be maintained, because the commands that govern the subsequent segment have been already prepared in the buffer before the interrupt occurs. 4. Analysis of Chord Error and Speed Error Figure 7 presents chord and speed errors of the traditional CNC. When the required curve is defined as the dotted line in the figure, the points A i,(i = 0ton, where n is the total number of the segment along the curve) on the curve can be derived parametrically, from Eqs. (1) to (4), and the discrete form of the parameter is as indicated in Eq. (5). The points generated by the reference-word interpolation spread along the segments. Accordingly, the chord error during reference-word interpolation equals the chord error of the segments. The chord error in the reference-word interpolation can be obtained using middle points M i (i = 1ton) as JSME International Journal

789 Fig. 7 Fig. 8 Chord and speed errors of reference-word interpolation and segments Chord errors associated with buffered DDA command generation shown in Fig. 7. The middle points are identified by halving the increment of the parameter. Calculating the distance between the corresponding middle point and the line on the original segment generates the chord errors ε. The actual speed, V(t) in the figure, is accurate up to but not including the final interpolation. The points generated by the final interpolation are always at the ends of the segments. Therefore, the actual speed, V(t +1) in the figure, of the final interpolation of the segments is generally less than the values f r in BLUs/ t. The actual speed can be determined using the following equation. R(t) R(t 1) V(t) = (22) t When the ends of the segments, A i (i = 1ton), are transferred to the CNC, as shown in Fig. 8, the points interpolated by DDA are also spread along the segments. However, the points that are fed to the reference inputs of the position control loops are selected using the required speed f r in the ISR. The chord error, δ in the figure, may exceed the error of the segments, indicated by ε in the figure. As ISR selects commands cross two segments, the chord error increases with the desired speed f r. If the prestored points are always before the points required to be references of the position control loops in ISR, then the segmentation process does not alter the speed in the sampling interval, even when some of the segments are processed in that interval. The chord error of the buffered DDA cannot be obtained directly from the middle points M i as shown in Fig. 8. The distances from the middle point M i and ends of the segment to the line of the pulled points R(t)andR(t 1) are calculated and the maximum distance selected as the chord error in the sampling interval. The actual speed V(t) is determined from Eq. (22), and is always close to the desired speed f r because it is not constrained by the ends of the segments. 5. Experimental Results Many machining processes require a resolution of the feedback device of BLU=1 µm, so this resolution is used in the experiment. The actual chord and speed error are confirmed using BLU=1 µm. The NURBS parametric curve with two degrees of freedom is defined as follows (4), (9), (11). The ordinal control points are (0,0), ( 150, 150), ( 150,150), (0,0), (150, 150), (150,150) and (0,0) (mm). The weight vector is W [ = [1 25 25 1 25 25 1]. The knot vector is U = 000 1 ] 1 1 3 4 2 2 4 111. The sampling time t, which is the interruption period, is set to 0.002 s and the required speed is V=12 m/min= 400 BLU/ t. The NURBS command generation algorithm to be confirmed is as shown in Eqs. (1) to (5), and is the same as found in recent literature (9), (10), (12). The motion control board with an AD21062 digital signal processor (DSP), shown in Fig. 9, is applied to implement the control algorithm, data required by which can be transferred from a personal computer (PC) via a dual ported RAM, IDT7024. The position commands and the actual speeds which are generated in the DSP are transferred to the PC. A traditional reference-word linear interpolator, such as described by Eqs. (6) to (8), is installed in ISR of the DSP. Replacing the ROM on the motion control board can run different software that implement the various control algorithms including the proposed buffered DDA. A real-time NURBS interpolator (5), (6), (9) (12) was installed in ISR of DSP to compare its results with those in this work. Position commands of the real-time NURBS are generated in every sampling interval, to meet the requirements of the speed f r in BLUs/ t. The increment u in the discrete form of Eq. (5) is approximated using the two terms in the Taylor expansion (5), (6), (9) (12), to improve the accuracy of the speed: f r t u = x 2 +y 2 +z ( f r t) 2 (x x +y y +z z ) 2 2(x 2 +y 2 +z 2 ) 2 (23)

790 Fig. 9 Photograph of motion control board Fig. 11 Chord error test at fixed u = 4 10 4 Fig. 10 Contour generated by NURBS where x = dp x(u) du, y = dp y(u) du, z = dp z(u) du, x = d 2 P x (u), y = d2 P y (u) and z = d2 P z (u). The resulting du 2 du 2 du 2 x, y, z, x, y and z can be determined from the parameter u(t), obtained in the preceding interruption, i.e., u(t 1). The results of the NURBS, A(u(t)),canbe directly used as references for the position control loops, such that R(t) = A(u(t)). The chord error ε and speed error can also be determined by the analysis described in the above section. The buffered DDA generation algorithm generates the curve plotted in Fig. 10 after the segment points of NURBS have been sent to program MAIN in DSP. The contour in the figure is as described in the literature (9).The number of the segments transferred to the DSP is 2 502 when the increment of the parameter u = 4 10 4. The chord errors of the segments are obtained as presented in Fig. 11, according to the analysis in the preceding section, using a fixed increment of u = 4 10 4 /2. The maximum chord error increases to almost 2 µm atu = 0.5, which valueisreached atthe position (0, 0). When the increment, u, is set to a large value, such as u = 6 10 4, the number of segments is reduced to 1 668. The maximal chord error increases to 3.7 µm, as depicted in Fig. 12. The chord error falls below 1 µm as shown in Fig. 13, when a small Series C, Vol. 48, No. 4, 2005 Fig. 12 Fig. 13 Chord error test at fixed u = 6 10 4 Chord error test at fixed u = 2 10 4 increment such as u = 2 10 4, is set. The number of segments that have such increment then rises to 5 002. A small increment can provide highly accuracy of the lineconnected segments. However, many such segments are JSME International Journal

791 Fig. 14 Speed error at fixed u = 4 10 4 Fig. 15 Chord error during real-time NURBS using two terms in the Taylor expansion generated during motion. The resulting segments are transferred into G01 codes and sent to the motion control unit of the CNC such as MAIN in the DSP. The reference-word interpolation interpolates the segments to the references of the position control loops using Eqs. (6) to (8) at the desired speed f r. Figure 14 plots the percentage errors in the actual speed. The percentage reaches almost 100% because the distance moved in the final interpolation of a segment is normally short. The speed cannot be maintained by a traditional linear interpolation, so the real-time NURBS is applied in some advance CNC systems to improve the accuracy of the speed. In this work, the real-time NURBS is also implemented using this experimental hardware, according to Eqs. (1) to (5) and Eq. (23). The actual chord and speed errors are compared with those obtained by the proposed algorithm. Figure 15 presents actual chord errors during interpolation, using the two terms in the Taylor expansion. Figure 16 shows the percentage speed error, which is as in the literature (9), except in that BLU=1 µm was used herein. The small error in the speed is obtained using real-time NURBS interpolation. When the segments that are generated using the fixed increment u = 4 10 4 are sent to the MAIN of DSP, the DDA is executed therein. The results are stored in memory of the DSP. The ISR chooses the suitable commands from the memory, to yield the desired speed f r. The chord error generated by the buffered DDA can be specified as in Fig. 17, in which the maximal chord error reaches about that in Fig. 15. The chord error of the original segments near u = 0.5 is about 2 µm, and the actual chord error near 3.2 sec of motion exceeds this value. At close to the maximum chord error, the segments with large curvature are very short. Therefore, the chord errors at large curvatures in both figures are almost equal. The chord error is maximum at approximately coordinates X = 139 730 µm, Fig. 16 Speed error during real-time NURBS using two terms in the Taylor expansion Y = 124 620 µm, at a value close to 4 µm, as shown in Fig. 18, in which the dotted line is obtained using an increment of u approximately obtained by two terms of the Taylor expansion, as specified by Eq. (23). The dashed line is generated by the DDA in the program MAIN. The solid line connects every R(t) that is chosen by the ISR, and is similar to that shown in Fig. 8. The actual speed is maintained as shown in Fig. 19, and the results are similar to those in Fig. 16. The actual speed can also be maintained by the generation of a simple buffered DDA command without NURBS interpolation in the control system. Some segments can be processed and interpolated during an interruption, which is a sampling interval. The residual length of the final interpolation of a segment can be connected to the start of the following segment. The increase in the increment of the parameter u can be set to u = 6 10 4 to reduce the number of segments. Figure 20 plots the variation in the chord error during the chord test, in which the maximum chord er-

792 Fig. 17 Chord error generated by the buffered DDA algorithm at fixed u = 4 10 4 Fig. 20 Chord error generated by the buffered DDA algorithm at fixed u = 6 10 4 Fig. 18 Large chord error at about X = 1.397 3 10 5 µm, Y = 1.246 2 10 5 µm Fig. 21 Speed error generated by the buffered DDA at fixed u = 6 10 4 error after the buffered DDA has been generated is also large. Increasing the increment in parameter u increases the chord error. The actual speed error can still be maintained as shown in Fig. 21, which is similar to Fig. 19. When a precise contour is required, a small increment in the parameter can be used. Figure 22 presents the actual chord error when the increment of the parameter u is set to the small value 2 10 4. The mean chord error is less than that in the preceding increment. The actual speed is maintained as shown in Fig. 23, which is similar to Fig. 19. The increment in the parameter can be set to a small value, constrained by the maximal chord error and memory size. Fig. 19 Speed error generated by the buffered DDA at fixed u = 4 10 4 ror remains about to 4 µm. However, the mean chord error increases. The chord error of the original segments, shown in Fig. 12, is high. Hence, the maximum chord Series C, Vol. 48, No. 4, 2005 6. Conclusions This work demonstrates the feasibility of using the buffered digital differential analyzer (DDA) algorithm in a computerized numerical controller (CNC). After a parametric curve has been transformed into the segments using a fixed parameter increment under the constraint on JSME International Journal

793 Acknowledgements The author would like to thank the National Science Council of the Republic of China for financially supporting this work under Contract No.NSC91-2212-E-212-015. References Fig. 22 Fig. 23 Chord error generated by the buffered DDA algorithm at fixed u = 2 10 4 Speed error generated by the buffered DDA at fixed u = 2 10 4 the chord error and the memory size, the algorithm interpolates more than one segments using a simple DDA in main program in an interruption interval. The algorithm chooses the suitable commands in ISR after the results obtained by the DDA have been pushed into the memory to obtain a short computation time of the service routine. The algorithm guarantees the accuracy of the line-connected contour and speed without considering a change in the parameter as a function of time. The actual chord error can be kept below the threshold as required, and the actual speed is similar to that determined from two terms in the Taylor expansion. Improvements to machines that must have a high sampling rate and a high speed along short segments, such as required in die sinking electric discharge machining (EDM ing) and wire cutting electric discharge machining (WEDM ing), which will be addressedinthefuture. ( 1 ) De Boor, C., A Practical Guide to Splines, (1978), Springer-Verlag New York, Inc., New York. ( 2 ) Piegl, L. and Tiller, W., Curve and Surface Constructions Using Rational B-Splines, Computer-Aided Design, Vol.19, No.19 (1987), pp.485 498. ( 3 ) Piegl, L., On NURBS: A Survey, IEEE Computer Graphics and Application, Vol.11, No.1 (1991), pp.55 71. ( 4 ) Piegl, L. and Tiller, W., The NURBS Book, (1997), Springer, New York. ( 5 ) Koren, Y., Lo, C.C. and Shpitalni, M., CNC Interpolators: Algorithms and Analysis, ASME Winter Annual Meeting, PED-64 (1993), pp.83 92. ( 6 ) Shpitalni, M., Koren, Y. and Lo, C.C., Real-Time Curve Interpolators, Computer-Aided Design, Vol.26, No.11 (1994), pp.832 838. ( 7 ) Chou, J.J. and Yang, D.C.H., Command Generation for Three-Axis CNC Machining, ASME J. Eng. Indust., Vol.113, No.113 (1991), pp.305 310. ( 8 ) Huang, J.T. and Yang, D.C.H., A Generalized Interpolator for Command Generation of Parametric Curves in Computer-Controlled Machines, ASME Japan/USA Symp. Flexible Automation, Vol.1 (1992), pp.393 399. ( 9 ) Yeh, S.S. and Hsu, P.L., The Speed-Controlled Interpolator for Machining Parametric Curves, Computer- Aided Design, Vol.31, No.5 (1999), pp.349 357. (10) Cheng, M.Y., Tsai, M.C. and Kuo, J.C., Real-Time NURBS Command Generators for CNC Servo Controllers, Int. J. of Mach. Tools and Manuf., Vol.42, No.7 (2002), pp.801 813. (11) Yeh, S.S. and Hsu, P.L., Adaptive-Feedrate Interpolation for Parametric Curves with a Confined Chord Error, Computer-Aided Design, Vol.34, No.3 (2002), pp.229 237. (12) Xhiming, X., Jincheng, C. and Zhengjin, F., Performance Evaluation of a Real-Time Interpolation Algorithm for NURBS Curves, Int. J. Adv. Manuf. Technol., Vol.20 (2002), pp.270 276. (13) Koren, Y., Interpolator for a CNC System, IEEE Trans. on Computers, Vol.25, No.1 (1976), pp.32 37. (14) Koren, Y. and Masory, O., Reference-Pulse Circular Interpolators for CNC Systems, ASME Journal of Engineering for Industry, Vol.103, Feb. (1981), pp.131 136. (15) Masory, O. and Koren, Y., Reference-Word Circular Interpolators for CNC Systems, ASME Journal of Engineering for Industry, Vol.104, Nov. (1982), pp.400 405.