Abstract:
An iterative spline function controlled positioning mechanism such as a machine tool. A movable element of the machine tool is driven about a plurality of axes under computer control along a path formed by a plurality of sections. Each of the path sections is represented in parametric form by spline functions. The element is driven through a plurality of intermediate positions approximating positions on the path sections. An iterative algorithm implemented by the computer permits efficient computation of the intermediate positions.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to computer controlled positioning mechanisms. In particular, the present invention is an iterative spline function controlled machine tool. 
     2. Description of the Prior Art 
     Computer controlled positioning mechanisms or machine tools such as contouring machines, welding machines, and robot arms are well known and in widespread application. Machines of this type include a tool element or other assembly which is movable about one or more motion axes. In response to a set of control points programmed into the machine tool, a computer will generate commands causing the tool element to be driven along a smooth path defined by the control points. 
     Oftentimes, the desired path of motion represented by the control points is a complex one which is not easily represented in mathematical terms. In these applications the path is typically broken up into sections having end points defined by the control points, and individual or spline functions (polynomial equations) are used to characterize the path sections between the control points. A plurality of intermediate positions about the path sections are computed utilizing the spline functions. The tool element is then linearly driven between the computed intermediate positions. The spline functions are fitted together at the control points to produce a continuous function over the desired path of motion. One machine tool of this type is described in the Ramsey et al U.S. Pat. No. 4,258,425 which is entitled SELF-PROGRAMMED MECHANICAL WORKING APPARATUS. 
     The use of spline functions is also disclosed in the Metcalf U.S. Pat. No. 3,869,601 entitled COMPUTING APPARATUS FOR TRACKING MOVING OBJECTS. 
     One drawback with computer controlled machine tools such as those described above is the fact that a very large number of mathematical operations must be executed by the computer to calculate each of the intermediate positions about each of the path sections. Assuming, for example, that the spline function characterizing each axis of motion along each path section is a third order polynomial, six multiplication and three addition operations are needed to evaluate each intermediate position of each axis of motion. Even with fast computers, this method is inefficient and slow. Although more efficient iterative spline function techniques for generating curves for computer graphics are known, as disclosed for example in the article entitled &#34;A Bit-Slice Controller For Cubic Spline Generation&#34; by R. Kalyanalkrishnan and C. S. Moghe published in Displays, April 1984, algorithms of this type have never been applied to computer controlled machine tools. 
     It is evident that there is a continuing need for improved computer controlled machine tools. A computer controlled machine tool which utilizes an iterative algorithm to generate data representative of positions approximating those about path sections characterized by spline functions would be especially desirable. The algorithm must be applicable to machine tools having any number of axes, and be applicable to spline functions of any order. All data, including the polynomial coefficients of the spline functions, should be calculated utilizing a set of control points and initial condition data programmed into the machine tool computer. Furthermore, the machine tool should also be capable of driving the machine element along a desired path at constant velocity. The machine tool could be efficiently controlled by an algorithm of this type. 
     SUMMARY OF THE INVENTION 
     The present invention is an apparatus for driving a movable element in space about N axes of movement between a first position P 1  =[p 1  (t 1 ), p 2  (t 1 ), . . . p N  (t 1 )], and a second position P 2  =[p 1  (t 2 ), P 2  (t 2 ), . . . p N  (t 2 )]. The movable element is driven along a first path section represented in parametric form as a function of an independent variable t by M-order polynomial equations of the form p n  (t)=a n ,0 +a n ,1 t+a n ,2 t 2  + . . . a n ,M t M . I intermediate positions PI i  =[p 1 ,i, p 2 ,i, . . . p N ,i ] for each i=1, 2, . . . I separated by subintervals Δt and approximating positions along the first path section intermediate the first and second positions during an interval t 1  ≦t≦t 2  are computed. The element is then driven from the first position, through the intermediate positions, to the second position. 
     Input means such as a terminal are adapted to receive input data. Input data includes data representative of the first position p n  (t 1 ), and the second position p n  (t 2 ), of the element on each of the N axes, and data representative of at least M-1 derivatives of the polynomial equations for each of the N axes at the first and second element positions. The data representative of the at least M-1 derivatives and the first and second positions characterizes at least M+1 initial condition values of element position and motiong along each axis. Input data representative of the interval (t 2  -t 1 ), and data representative of the number, I of intermediate positions PI i , is also received. 
     Computer means responsive to the input means compute data as a function of the input data and produce signals representative thereof. Polynomial coefficients a n ,m for each of the M orders of each of the N axes are computed by simultaneously solving, for each axis, a set of at least M+1 equations describing one of the least M+1 initial condition values in terms of the polynomial coefficients. Initial difference values Dm n ,0 for each of the M orders of each of the N axes are also computed. These difference values approximate an average value of the derivatives of the polynomial equations over a first subinterval Δt. The difference values Dm n ,0 can be determined and evaluated in terms of the polynomial coefficients by recursively evaluating the following equations: 
     
         Dm.sub.n,sΔt =D(m-1).sub.n,(s+1)Δt -D(m-1).sub.n,sΔt, 
    
     
         where: 
    
     
         DO.sub.n,sΔt =p.sub.n (sΔt); and Δt=(t.sub.2 -t.sub.1)/I. 
    
     Data representative of the first position P 1  and the second position P 2  and intermediate positions PI i  are also computed. Intermediate positions PI i , for each of the N axes, are computed by iteratively evaluating the following equations: 
     
         p.sub.n,i =p.sub.n,(i-1) +D1.sub.n,(i-1) ; 
    
     
         Dm.sub.n,i =Dm.sub.n,(i-1) +D(m+1).sub.n,(i-1) for each order m=1, 2, . . . M-2; and 
    
     
         D(M-1).sub.n,i =D(M-1).sub.n,(i-1) +DM.sub.n,0 ; 
    
     Actuator means responsive to the computer means move the element from the first position, through the intermediate positions, to the second position. 
     In preferred embodiments the apparatus drives the element from the second position through a plurality of intermediate positions along a second path section, and to a third position, in a similar manner. The independent variable can be used to represent time or path length. The algorithm implemented by the computer enables an efficient generation of data needed to control the machine tool. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram representation of a robot machining system in accordance with the present invention. 
     FIG. 2 is a graphic illustration of a three-dimensional path about which the robot arm of the machining system illustrated in FIG. 1 can be driven. 
     FIG. 3 is a generalized mathematical representation of an M-order polynomial equation describing the motion of the robot arm about each of the N axes of movement. 
     FIG. 4 is an illustration of the convention by which positions along the path illustrated in FIG. 2 are characterized by ensembles of positions about the N axes. 
     FIG. 5 is an illustration of the convention by which intermediate positions along the path illustrated in FIG. 2 are characterized by ensembles of positions on each of the N axes. 
     FIG. 6 is a graphic representation of the motion of the robot arm about one of the axes illustrated in FIG. 2. 
     FIG. 7 is a generalized mathematical representation of iterative equations which are recursively evaluated to determine intermediate positions about each of the N axes. 
     FIG. 8 is a generalized mathematical representation of equations which are recursively evaluated to determine initial difference values utilized by the equations described in FIG. 7. 
     FIG. 9 is a graphic example of a &#34;tree&#34; structure which visually illustrates the equations shown in FIG. 8. 
     FIG. 10 is a representation of the equations shown in FIG. 7 for use with fifth-order polynomial equations. 
     FIG. 11 is a representation of the equations shown in FIG. 8 for use with fifth-order polynomial equations. 
     FIG. 12 is a representation of an equation used to calculate an average velocity over a previous path section for use as an ending velocity during a next subsequent path section. 
     FIG. 13 is an equation used to calculate an average velocity over two sequential path sections for use as an ending velocity for a second of the sequential sections. 
     FIG. 14 is a representation of an equation used to calculate the time interval between first and second positions when it is desired to drive the robot arm between these positions at a constant velocity. 
     FIG. 15 is a representation of an equation relating the duration of the path subintervals shown in FIG. 2 to a ratio of the difference of the independent variables at the first and second position to a number of desired subintervals. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     The present invention is a computer controlled positioning mechanism or machine tool such as a contouring machine, welder, milling machine, robot arm or the like. Machine tools of this type all include an element such as a cutting tool or robot wrist which is movably driven in space about at least one, and often a plurality, of axes. An iterative algorithm is implemented by the computer to efficiently generate approximations to spline functions representative of a desired program of movement. 
     One embodiment of the present invention, robot machining system 10, is illustrated generally in FIG. 1. Machining system 10 includes a robot wrist or arm 12 which is capable of being physically driven or moved about at least one, or N, axes of movement. Robot arm 12 can, for example, be driven about linear and orthogonal x, y, z axes, and a rotational axis θ. Movement of robot arm 12 about each of the N axes is produced by actuators 14A-14N, respectively, in response to servo control signals provided by servo controllers 16A-16N, respectively. Input data representative of desired positions and motion characteristics of robot arm 12 is provided to computer 18 by a source such as terminal 20. In response to the input data, computer 18 produces position signals representative of a desired program of movement of robot arm 12 on each of the N axes. The position signals are representative of data computed by computer 18 utilizing the iterative algorithm hereinafter described. 
     Motion of robot arm 12 about a first, second, and third axis (i.e., N=3) as a function of an independent variable t is described with reference to FIG. 2. As shown, robot arm 12 is driven in space along a path 22 between first, second, and third positions P 1 , P 2 , and P 3 , respectively. Positions P 1 , P 2 , and P 3  are the positions of robot arm 12 at variable t=t 1 , t 2 , and t 3 , respectively. Path section 22A which is between positions P 1  and P 2 , and path section 22B which is between positions P 2  and P 3 , are each mathematically described by separate individual or spline functions which are continuous at their point of intersection, i.e., P 2 . Path sections 22A and 22B are each described or represented as a function of an independent variable t by N, or in the example shown in FIG. 2, three, M-order parametric equations such as that illustrated in FIG. 3. using this convention, positions P 1 , P 2 , and P 3  of robot arm 12 can be described as sets or ensembles of its positions about each of the N axes, p 1  (t)-p N  (t), at variables t=t 1 , t 2 , t 3 , respectively, as illustrated for example in FIG. 4. 
     Actuators 14A-14N drive robot arm 12 along path sections 22A-22B as a function of the signals produced by computer 18 by linearly driving the arm along a plurality, or I, subintervals Δt i  to intermediate positions PI i  as shown in FIG. 2. Each intermediate position PI i  is representative of a position of robot arm 12 on path sections 22A and 22B between positions P 1  and P 2 , and P 2  and P 3 , respectively. In the example shown in FIG. 2, robot arm 12 is linearly driven along I=10 subintervals Δt i . Intermediate positions PI 10  for both path sections 20A and 20B are positions P 2  and P 3 , respectively. 
     Movement of robot arm 12 as a function of independent variable t about axis 1 in FIG. 2, which is representative of all N axes, is illustrated in FIG. 6. The first, second, and third positions of robot arm 12 along the first axis are characterized as p 1  (t=t 1 ), p 1  (t=t 2 ), and p 1  (t=t 3 ), respectively. Using this same convention, intermediate positions of arm 12 between p 1  (t 1 ) and p 1  (t 2 ), and p 1  (t 2 ) and p 1  (t 3 ), are characterized as p 1 ,i for i=1-10. 
     Again utilizing this convention, intermediate positions PI i  can be described by an ensemble of position values p 1 ,i -p N ,i representative of the position of robot arm 12 on each of the N axes, as illustrated for example in FIG. 5. I=10 intermediate positions p 1 ,i of arm 12 between positions p 1  (t 1 ) and p 1  (t 2 ), and between p 1  (t 2 ) and p 1  (t 3 ), are illustrated in FIG. 6. 
     In one embodiment of the present invention, functions characterizing path sections 22A-22B are known. For applications of this type data representative of all polynomial coefficients a n ,m for each of the M orders of the polynomial equations for each of the N axes is known, and input to computer 18 through terminal 20. In other embodiments, computer 18 computes all polynomial coefficients a n ,m as a function of initial condition data describing position and motion characteristics of robot arm 12. Consequently, computer 18 must receive input data through terminal 20 to make these computations. 
     Input data utilized by computer 18 to compute polynomial coefficients a n ,m for the equations characterizing path section 22A includes data representative of positions P 1  and P 2 . This data is preferably received in terms of the first position p n  (t 1 ) and the second position p n  (t 2 ) of robot arm 12 on each of the N axes. For each path section 22A-22B, data representative of independent variable t at the first and second positions, such as values of t 1  and t 2 , or the interval (t 2  -t 1 ), and data representative of the number, I, of subintervals Δt i , is also required by computer 18. 
     Computer 18 must also receive data representative of at least M minus one (M-1) derivatives of the polynomial equations describing each of the N axes at first and second positions p n  (t 1 ) and p n  (t 2 ), respectively. This input data is sufficient to characterize at least M plus 1 (M+1) initial condition values of the position and motion of robot arm 12 along each of the N axes. Polynomial coefficients a n ,m for each order M of each of the N axes can then be computed by simultaneously solving, for each axis, a set of at least M+1 one equations describing one of the M+1 initial condition values in terms of the polynomial coefficients. Computations of this type are well known, and computer 18 can easily be programmed by those skilled in the art to perform these operations. 
     Rather than computing intermediate positions p n ,i for each of the N axes using the polynomial equations described generally in FIG. 3, computer 18 utilizes an iterative algorithm which requires only M additions to compute approximated intermediate positions p n ,i. Computing time can thereby be greatly reduced. Using the algorithm described, computer 18 computes these approximated intermediate positions as a function of data representative of an immediately preceding position, and difference values Dm n ,i which represent an average value of continuous derivatives over subintervals Δt i . For each of the N axes, all I intermediate positions p n ,i are found by repetitively evaluating the equations described in FIG. 7. 
     To evaluate the equations described in FIG. 7, it is first necessary to compute initial difference values Dm n ,0 for each of the M orders of the equations describing each of the N axes. Initial difference values Dm n ,0 approximate an average value of the derivatives of the polynomial equations over a first subinterval Δt 1 . Initial difference values Dm n ,0 can be determined and evaluated by computer 18 in terms of the polynomial coefficients by recursively evaluating the equation described in FIG. 8. The &#34;tree&#34; structure illustrated in FIG. 9 can be used as an aid to visualize this recursive evaluation. For example, D2 n ,0 =D1 n ,Δt -D1 n ,0, while D1 n ,Δt =p n ,2Δt -p n ,Δt, and D1 n ,0 =p n ,Δt -p n ,0. 
     When the motion of robot arm 12 can be described by fifth-order polynomial equations (M=5), the equations described in FIG. 7 which must be repetitively evaluated to determine intermediate positions p n ,i can be reduced to the equations described in FIG. 10. The equations described in FIG. 8 which are evaluated to determine the initial difference values Dm n ,0 can be reduced to the equations illustrated in FIG. 11 for applications in which the motion of robot arm 12 can be characterized by fifth-order polynomial equations. Polynomial equations of a lower order (e.g., M&lt;5) are simply a specific case of the fifth-order equations in which polynomial coefficients a n ,M+1 -a n ,5 are set equal to zero. 
     Using the procedures described above, computer 18 (FIG. 1) can efficiently compute data representative of intermediate positions PI i . Beginning from position P 1  for example (FIG. 2), computer 18 will first generate data representative of a first intermediate position p n ,1 for each of the N=3 axes of motion. This data is provided to axis servo controllers 16A-16N, respectively. Servo controllers 16A-16N, in turn, produce servo control signals which cause actuators 14A-14N to linearly drive robot arm 12 to first intermediate position PI 1 . These procedures are then repeated so as to continually drive robot arm 12 through all I intermediate positions until second position P 2  is reached. 
     Robot arm 12 can be driven through position P 2  to position P 3  along second path section 22B in an identical manner. In this way, robot arm 12 can be driven along a path such as 22 which is comprised of sections characterized by individual spline functions. Continuity between the individual spline functions describing each path section can be produced if the derivatives characterizing the spline functions are equal to one another at the positions of intersection, i.e. P 2  in FIG. 2. For those applications in which polynomial coefficients a n ,m must be computed for the equations describing the N axes of path section 22B, computer 18 will require at least M+1 initial condition values to make these calculations, as previously described for path section 22A. These initial condition values can be taken from a set of values including element positions on each of the N-axes at variable t=t 2  and t 3 , and data representative of derivatives (e.g., velocity and acceleration) of the equations at the second and third positions. Data representative of the second position and derivatives of the equations at this point are known, or can be computed by computer 18 utilizing the equations describing path section 22A. It may, however, be necessary to select the value of some derivatives at the third positions. 
     For each of the N axes, ending velocity or other characteristics of motion of robot arm 12 for each sequential or next path section such as 22B, as described by derivatives of the equations representative thereof at t=t 3 , can be determined in one of several ways. One option is to set the derivatives at the end of the subsequent path section such as 22B equal to the average of the derivative over the previous path section such as 22A. For example, the first derivative, or velocity, of robot arm 12 on the first axis at t=t 3  for path section 22B can be determined in accordance with the equation described in FIG. 12. This method tends to produce overshoot. 
     Alternatively, the derivatives at the end of path section 22B can be set equal to the average of the derivatives over previous path section 22A, and path section 22B. The equation for computing the first derivative, or velocity, of robot arm 12 on the first axis, v 1  (t 3 ), in accordance with this alternative is illustrated in FIG. 13. This method produces less overshoot than that described immediately above, but requires more calculations. The choice will depend upon the particular application to which the invention is being adapted. 
     In some applications it is also desirable to control the speed of robot arm 12 along path sections 22A and 22B. In applications of this type, independent variable t is used to represent time, and the time interval t 2  -t 1  (for path section 22A) is determined as a function of the distance to be traveled and the desired velocity v. This time interval can be computed using the equation illustrated in FIG. 14. Alternatively, the number I of subintervals Δt i  can be specified using the relation described in FIG. 15. Again, the choice depends upon the particular application to which the invention is being put. 
     In conclusion, the present invention is a computerized machine tool which utilizes an iterative algorithm to efficiently generate data representative of a desired program of movements. Those skilled in the art can easily program a computer to implement the equations described above. 
     Although the present invention has been described with reference to preferred embodiments, workers skilled in the art will recognize that changes may be made in form and detail without departing from the spirit and scope of the invention.