Oscillator-based path planning for machining of a pocket shape in workpiece
09575486 ยท 2017-02-21
Assignee
Inventors
Cpc classification
G05B19/40937
PHYSICS
G05B19/4099
PHYSICS
Y02P90/02
GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
G05B2219/36214
PHYSICS
G05B2219/34105
PHYSICS
International classification
G05B19/4099
PHYSICS
Abstract
A method determines a path of a tool machining a pocket shape in a workpiece. The pocket shape is defined by a closed curve in an x-y plane. The method determines positions and velocities of a motion of an oscillator having an energy defined by a function that is positive within a boundary of the pocket shape and equals zero on the boundary of the pocket shape. The method determines coordinates of the path of the tool based on corresponding pairs of position and velocity values of the motion, wherein a position value of each pair represents an x coordinate of the path of the tool in the x-y plane, and a velocity value of each pair represents a y coordinate of the path of the tool in the x-y plane.
Claims
1. A method for determining a path of a tool machining a pocket shape in a workpiece, wherein the pocket shape is a closed curve in an x-y plane, comprising: determining positions and velocities of a motion of an oscillator having an energy defined by a function that is positive within a boundary of the pocket shape and equals zero on the boundary of the pocket shape; determining coordinates of the path of the tool based on corresponding pairs of position and velocity values of the motion, wherein a position value of each pair represents an x coordinate of the path of the tool in the x-y plane, and a velocity value of each pair represents a y coordinate of the path of the tool in the x-y plane; determining an equation describing the motion of the oscillator, wherein the equation includes a damping term; solving the equation with respect to time to determine a set of position and velocity values of the motion of the oscillator for a corresponding set of time instants; and determining coordinates of the path of the tool at each time instants based on corresponding position and velocity values of the motion; updating the damping term; updating the path of the tool by resolving the equation with the updated damping term; comparing a metric of a performance of the machining with a threshold; and repeating the updating the damping term and the path of the tool based on a result of the comparing, wherein steps of the method are performed by a processor.
2. The method of claim 1, wherein the positions and the velocities of the motion of the oscillator are determined as a function of time, further comprising: determining the coordinates as the function of time based on times of the corresponding pairs of position and velocity values.
3. The method of claim 1, further comprising: selecting an initial engagement point between the tool and a workpiece as a starting point of the motion of the oscillator.
4. The method of claim 1, further comprising: determining a metric of a performance of the machining with a threshold; and repeating the updating of the damping term and the path of the tool if the metric does not satisfy a constraint.
5. The method of claim 4, wherein the constraint is one or combination of a degree of a curvature, a length of the path, an angle of engagement of the tool, an amount of a removed volume, and a cutting force of the tool.
6. The method of claim 1, further comprising: determining an Rvachev (R)-function as the function of the energy of the oscillator; determining an equation describing the motion of the oscillator using the R-function, wherein the equation includes a damping term; solving the equation with different values of the damping term to produce a set of paths of the tool; and selecting the path of the tool from the set corresponding to an optimal metric of performance.
7. The method of claim 6, further comprising: simulating the machining by the motion of the tool according to each path from the set of paths to produce a set of simulations; and determining a metric of performance of each simulation from the set of simulations to produce a set of metrics; and selecting an optimal metric of performance from the set of metrics according to a cost function.
8. The method of claim 7, wherein the metric of performance includes an engagement surface of the tool moving along the path or a volume removed by the motion of the tool.
9. The method of claim 8, wherein the metric of performance includes the engagement surface, comprising: arranging a set of points on at least a part of a surface of the tool; determining a distance between each point in the set of points and a surface of the workpiece modified by the motion; and determining the engagement surface based on a subset of the points having the distance less than a threshold.
10. The method of claim 8, wherein the metric of performance includes the volume removed by the motion of the tool, comprising: generating a swept volume for a segment of the path of the tool, the segment defines the motion of the tool from a previous position to a next position of the tool during the simulation; casting rays through the swept volume to represent a motion of the tool in relation to the workpiece; determining a portion of volume removed from the workpiece by the swept volume based on intersections of at least some rays with the workpiece; and repeating the generating, the casting and the determining the portion of the volume steps for all segments of the path to produce the volume removed by the motion of the tool.
11. A system for determining for determining a path of a tool machining a pocket shape given by a closed curve on an x-y plane, comprising: a processor for determining positions and velocities of a motion of an oscillator having an energy defined by a function that is positive within a boundary of the pocket shape and equals zero on the boundary of the pocket shape and for determining coordinates of the path of the tool based on corresponding pairs of position and velocity values of the motion, wherein a position value of each pair represents an x coordinate of the path of the tool on the x-y plane, and a velocity value of each pair represents a y coordinate of the path of the tool on the x-y plane, wherein the processor determines an equation describing the motion of the oscillator, wherein the equation includes a damping term, and the processor solves the equation with respect to time to determine a set of position and velocity values of the motion of the oscillator for a corresponding set of time instants, determines coordinates of the path of the tool at each time instants based on corresponding position and velocity values of the motion, updates the damping term, updates the path of the tool by resolving the equation with the updated damping term, compares a metric of a performance of the machining with a threshold, and repeats the updating the damping term and the path of the tool based on a result of the comparing.
12. The system of claim 11, further comprising: a simulation system for simulating the machining of a workpiece according to the path to determine a metric of performance of the path.
13. A non-transitory computer readable recording medium for determining a path of a tool machining a pocket shape in a workpiece, having stored thereon, instructions that when executed by a processor, cause the processor comprising steps of: determining positions and velocities of a motion of an oscillator having an energy defined by a function that is positive within a boundary of the pocket shape and equals zero on the boundary of the pocket shape, wherein the pocket shape is a closed curve in an x-y plane; determining coordinates of the path of the tool based on corresponding pairs of position and velocity values of the motion, wherein a position value of each pair represents an x coordinate of the path of the tool in the x-y plane, and a velocity value of each pair represents a y coordinate of the path of the tool in the x-y plane; determining an equation describing the motion of the oscillator, wherein the equation includes a damping term; solving the equation with respect to time to determine a set of position and velocity values of the motion of the oscillator for a corresponding set of time instants; and determining coordinates of the path of the tool at each time instants based on corresponding position and velocity values of the motion; updating the damping term; updating the path of the tool by resolving the equation with the updated damping term; comparing a metric of a performance of the machining with a threshold; and repeating the updating the damping term and the path of the tool based on a result of the comparing.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
(13)
(14)
(15)
(16)
(17)
(18)
(19)
(20)
(21)
(22)
(23)
(24)
(25)
(26)
(27)
(28)
(29)
(30)
(31)
(32)
(33)
(34)
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT
(35) System and Method Overview
(36)
(37) The simulation system 150 can take as input either the G-Codes 106 generated by the CAD system 104, or the NC machine instructions 110 generated by the NC console 108. The input to the simulation system is sent to a computer processor 152, which simulates machining of the workpiece, and outputs a simulated model. 154, which can be stored in a computer memory 156. The processor 152 can render the stored simulated model 154 to generate a rendered image 158 which can be output to a display device 160. A displayed image 162 can be compared to the computer aided design model 102 to verify the G-Codes 106 or NC machine instructions 110 prior to performing the actual NC milling of the workpiece.
(38)
(39) The path of the tool relative to the workpiece can be specified in many forms.
(40)
(41)
(42) In some embodiments, the positions and the velocities of the motion of an oscillator are determined as a function of time. Accordingly, the coordinates are determined as the function of time based on times of the corresponding pairs of position and velocity values. Also, in some embodiments, an initial engagement point between the tool and a workpiece is selected as a starting point of the motion al the oscillator.
(43) Some embodiments of the invention are based on a realization that the pocket shape given by a closed curve in the x-y can be embedded in a function that is positive within the pocket shape and zero on the boundary of the shape. Such function can represent the total energy of an oscillator with position x and velocity y. The equation of the motion of the oscillator having that total energy can be derived. This equation of motion with sonic added negative damping supplies a curve that starts inside the pocket shape spirals outwards and eventually tracks the boundary of the shape.
(44) An oscillator-based path planning for pocket miffing provides a one way to interconnect layers of tool path. In addition, some embodiments further optimize the path for different tool and milling objectives by varying damping of the equation of motion. Notably, the method used by some embodiment of the invention does riot require calculating the level sets, and solving for partial differential equations. Also, the method eliminates the generation of an offset curve that can result in self-intersection and discontinuity.
(45)
(46) For example, some embodiments represent a complex pocket shape as combinations of simpler shapes. The compactness of such representation is an important factor, because simple implicit functions often require few coefficients, whereas parametric surfaces need complex control meshes and need a larger data storage. R-functions are R-functions-real-valued functions that behave as continuous analogs of logical (Boolean) functions. With R-functions, it is possible to construct functions with prescribed values and derivatives at specified locations, assisting in the solution of boundary value problems. R-functions can be used to define the approximate or exact distance functions over a given semi-analytic domain.
(47) In some embodiments, an implicit function is a function (x.sub.1, x.sub.2, . . . , x.sub.n)=y has zero values at desired locations in space. Thus, the zero set of the function implies the geometry of the defined set of points forming the boundaries of the pocket shape. The implicit functions therefore define the geometric model (or portions thereof) by having points within the model and/or its boundary take a zero value and points outside the model take other discrete values.
(48) The method 501 determines 515 an energy function defined by the positive function and includes a damping term 535 in the energy function. Next, an equation describing the motion of the oscillator according to the energy function is determined 520 and solved 525 with respect to time to determine a set of position and velocity values of the motion of the oscillator for a corresponding set of time instants. The coordinates of the path of the tool at each time instants are determined 530 as corresponding to position and velocity values of the motion.
(49)
(50)
(51)
(52)
For example, a circle 730 corresponds to
(53)
The circle 735 corresponds to E(x,{dot over (x)})=1. The point 733 corresponds to E(x,{dot over (x)})=0.
(54) The function 740
f(x,{dot over (x)})=1(x.sup.2+{dot over (x)}.sup.2)(1)
is positive over the domain x.sup.2+y.sup.2<1 and disappears on its boundary, thereby having the embedding properties described in equation (1). The function f(x,{dot over (x)}) 740 is related to the total energy of the oscillator, in that f(x,{dot over (x)})=12E(x,{dot over (x)}).
(55) Some embodiments of the invention determine an equation describing the motion of the oscillator defined by a function that is positive within a boundary of the pocket shape and equals zero on the boundary of the pocket shape by differentiating the total energy with respect to time as
(56)
(57) The curves of
(58)
{umlaut over (x)}2{dot over (x)}+x=0.(3)
(59)
(60) To generalize from the example, various embodiments determine a function f(x, y) that is positive over the given pocket shape S and zero at the boundary (we use R-functions for this purpose) and consider this function as the total energy of a one-degree-of freedom oscillator. The original spatial coordinates (x, y) now correspond to position x and velocity {dot over (x)} of the oscillator. The motion of the oscillator is fully characterized by a trajectory in the (x, {dot over (x)}) plane. If the oscillator is conservative (i.e. some energy-like quantity is constant along trajectories), the trajectories are (in general) closed curves corresponding to constant total energy and are level sets of f(x(t), {dot over (x)}(t)), i.e.
f(x(t), {dot over (x)}(t))=const.(4)
(61) The equation of motion of the oscillator is determined by differentiating eq. (4) with respect to time
(62)
(63) To make a transition between the closed curves of this conservative system, a negative damping term is introduced in the equation of motion (5)
(64)
wherein x(t), {dot over (x)}(t) and {umlaut over (x)}(t) are the position, velocity and acceleration of the oscillator, respectively and is the damping coefficient.
(65)
(66) Some embodiments of the invention are based on another realization that the damping coefficient can serve as a parameter for the optimization problem. For example, some embodiments solve, the equation of the motion with different values of the damping term to produce a set of paths of the tool and select from the set the path corresponding to an optimal metric of performance or constraints of the machining. Examples of the constraint include a degree of a curvature, a length tool path, an angle of engagement of the tool, an amount of a removed volume, and a cutting force of the tool. To evaluate the metric, of performance or test for the constraints, some embodiments simulate the machining of the workpiece with a motion of the tool according to the path determined by various embodiments of the invention.
(67)
(68)
(69) This tool path file is used in the NC milling simulation 150 to calculate various metrics 1020 of performance and to check whether the constraints 1012 are satisfied 1022. The constraints can be user defined. The acceptance 1026 of the final tool path 1028 is based on the computed cost function 1024. Examples of cost function 1024 can include a comparison of one or several metric of performance of the tool path 1018.
(70) For example, one embodiment simulates the machining a workpiece by the motion of the tool according to each path from the set of paths of the tool to produce a set of simulations and determines a metric of performance of each simulation from the set of simulations to produce a set of metrics. The embodiment selects the optimal metric of performance from the set of metrics according to a cost function. For example, the cost function can compare the metric, of performance with a predetermined threshold. Examples of the metric of performance can include, e.g., a size of engagement surface of the tool moving along the path or an amount of volume removed by the motion of the tool.
(71) Engagement Surface and Removed Volume
(72)
(73)
(74)
(75)
(76)
(77)
(78)
(79) A set of points 1235 is arranged 1230 on at least a part of a surface of the tool. In various embodiments the set of points is arranged according to a sampling pattern, as described in more details below. Also, in some embodiments, the set of points are arranged using various techniques of software engineering and computer graphics. In another embodiment, the set of points is arranged in real time of simulation without creating a separate data structure.
(80) For each point in the set, a distance 1245 between a point, and a surface of the workpiece modified by the motion is determined 1240, and compared 1250 with a threshold 1247 to determine a subset of points 1255 forming 1260 an engagement surface 1265. For example, the engagement surface is formed based on the subset of points having the distance below the threshold. Next, in some embodiments, an area and an angle of engagement between the tool and the workpiece are determined 1270 based on the engagement surface 1265.
(81) Various embodiments of the invention are based on a realization that the swept volume corresponds to a maximum potential removed volume, so to determine the actual removed volume, the embodiments test a space internal to the swept volume. For example, various embodiments of the invention populate a space internal to the swept volume with a set of rays, and determine the removed volume based on intersections of the rays with the workpiece inside the swept volume. The populating of volume with rays can be done using various computer graphic techniques and according to various sampling patterns, as described in more details below.
(82)
(83) The ray casting allows computing the distances for each point along the ray until the ray intersects the surface. Especially, the distance fields differentiate by its sign information whether the point is within the swept volume or not.
(84) Determining Engagement Surface
(85)
(86) In one embodiment, the tool path segment is parameterized by a single parameter t, which corresponds to time traveled by the tool along the path, and the tool 1402 is transformed 1412 to the end position of tool path segment 1414.
(87) Using a sampling pattern 1416, test points 1420 are determined on the boundary of tool 1418. For each test point. 1420, a corresponding distance from the test point to the in-process workpiece 1406 is calculated 1422. The magnitude of the distance 1424 is compared 1428 to the predetermined maximum distance threshold epsDist 1426. If the absolute value of distance is greater than the maximum distance threshold, then the test point is not on the boundary of in-process workpiece. If there are no test points on the boundary of the in-process workpiece, then there is no engagement between the tool and in-process workpiece 1438.
(88) If the absolute value of distance between the test point and in-process workpiece is less than the maximum distance threshold, then the test point is on the boundary of the in-process workpiece. The engagement angle 1430 and area 1434 are determined based on the distances of test points to the composite ADF. After all the test points have been processed, the angles of engagement 1432 are determined. Next, the angles of engagement are integrated to calculate the area of engagement 1436.
(89) Various embodiments of the invention use different sampling pattern 1416. In one embodiment, the sampling pattern, for example, is a set of regularly spaced points in a cylindrical coordinate system, wherein points are equally spaced in angle within equally space planes perpendicular to the tool axis. Alternately, the points can be described in a spherical coordinate system in which the points are equally spaced in azimuth angle within planes that are equally spaced in elevation angle.
(90) In some embodiments, the engagement surface represents the geometric information necessary for milling force prediction in NC milling. Therefore, the accuracy of the prediction of the force depends on the accuracy of the angle of engagement determined based on the accuracy and the density of the sampling pattern. For example, when the depth of the tool along the tool path decreases, the contribution of the region close to the tool tip become more important than the case where the depth increases.
(91)
(92)
(93) Some embodiments determine an area and an angle of the engagement between the tool and the workpiece based on the engagement surface. For example, one embodiment determines the angle of engagement by using an arctangent function of a tangent tool path vector 1511 and a normal vector 1512. The entry and exit angles of engagement are defined in clockwise direction and measured from the normal vector and where the entry angle is the angle at which the tool begins cutting the workpiece and the exit angle is the angle at which the tool stops cutting the workpiece. For given depths 1506 and 1507, the cross sections 1510 and 1520 of the in-process workpiece are respectively shown in
(94) During an instant attic simulation, the engagement surface can have one or multiple pairs of entry and exit angles. At the depth z1 1506, the angle of engagement 1513 includes one pair of entry and exit angles, however for the depth z2 1507 and the angle of engagement includes two pairs of entry and exit angles. In the first pair the tool enters the workpiece at 0 and exits at 70 1523, and in the second pair the tool enters the workpiece at 150 1524 and exits at 180 1525. In this example, although the engagement surface is a single surface, different number of pair of entry and exit angles exists for different cross-sections. Also, in various embodiments, the area of the engagement is determined based of a shape of the parts of the engagement surface using appropriate mathematical principles.
(95) Determining Removed Volume
(96)
(97) Generation of swept volumes is done by swept volume distance fields in a continuous manner. A current swept volume corresponding to a segment: of the path is sampled 1625 with the set of rays. In one embodiment, the swept volume is modified by taking the Boolean difference of previous tool instance from the swept volume.
(98) The rays intersecting 1626 with the workpiece participate in forming the removed volume 1627. Specifically, the rays are clipped against the workpiece according to the intersection test to determine the internal segments forming the removed volume. The internal segments of the rays have corresponding thickness and length, and can be combined lo approximate the removed volume. In some embodiments, the collection of the internal segments is processed 1628 to determine various properties of the material removed by the particular tool motion, such as its mass, volume, center of mass, width, thickness, length, inertia tensor or a moment of inertia. These properties can be evaluated by determining a boundary of the removed volume.
(99) After the determination of removed volume for each tool path segment, the composite ADF 1620 is edited 1630 with the swept volume distance field 1629 to simulate the milling of the workpiece with the tool motion. During the editing, the initial workpiece 1620 is updated by the swept volume distance field to obtain in-process workpiece 1630.
(100)
(101)
(102) For given depth of depth values 1707 and 1708 of the milling, the cross sections 1710 and 1720 of the in-process workpiece are shown respectively in
(103) Operating Environment
(104) Various embodiments of the invention can be operated by numerous general purpose or special purpose computing system environments or configurations. Examples of well-known computing systems, environments, and/or configurations that are suitable for use with the invention include, but are not limited to, personal computers, server computers, handheld or laptop devices, multiprocessor or multi-core systems, graphics processing units (GPUs), application-specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), microcontroller-based systems, network PCs, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like, i.e., generally processors.
(105) For example, the embodiments may be implemented using hardware, software or a combination thereof. When implemented in software, the software code can be executed on any suitable processor or collection of processors, whether provided in a single computer or distributed among multiple computers. Such processors may be implemented as integrated circuits, with one or more processors in an integrated circuit component. Though, a processor may be implemented using circuitry in any suitable format. A monitor or other type of display device 160 is connected to any of the above systems to enable visualization 162 of the invention.
(106) Further, it should be appreciated that a computer may be embodied in any of a number of forms, such as a rack-mounted computer, a desktop computer, a laptop computer, minicomputer, or a tablet computer. Such computers may be interconnected by one or more networks in any suitable form, including as a local area network or a wide area network, such as an enterprise network or the Internet. Such networks may be based on any suitable technology and may operate according to any suitable protocol and may include wireless networks, wired networks or fiber optic networks.
(107) Although the invention has been described by way of examples of preferred embodiments, it is to be understood that various other adaptations and modifications can be made within the spirit and scope of the invention. Therefore, it is the object of the appended claims to cover all such variations and modifications as come within the true spirit and scope of the invention.