WO2019113972A1 - 数控系统及其路径规划方法和计算机可读存储介质 - Google Patents

数控系统及其路径规划方法和计算机可读存储介质 Download PDF

Info

Publication number
WO2019113972A1
WO2019113972A1 PCT/CN2017/116613 CN2017116613W WO2019113972A1 WO 2019113972 A1 WO2019113972 A1 WO 2019113972A1 CN 2017116613 W CN2017116613 W CN 2017116613W WO 2019113972 A1 WO2019113972 A1 WO 2019113972A1
Authority
WO
WIPO (PCT)
Prior art keywords
tool
point
curvature
adjacent
path
Prior art date
Application number
PCT/CN2017/116613
Other languages
English (en)
French (fr)
Inventor
王伟
Original Assignee
深圳配天智能技术研究院有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳配天智能技术研究院有限公司 filed Critical 深圳配天智能技术研究院有限公司
Priority to PCT/CN2017/116613 priority Critical patent/WO2019113972A1/zh
Priority to CN201780034480.5A priority patent/CN109496286B/zh
Publication of WO2019113972A1 publication Critical patent/WO2019113972A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/18Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form
    • G05B19/4097Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form characterised by using design data to control NC machines, e.g. CAD/CAM
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/34Director, elements to supervisory
    • G05B2219/34083Interpolation general

Definitions

  • the present invention relates to the field of numerically controlled machining, and more particularly to a numerical control system, a path planning method thereof, and a computer readable storage medium.
  • the method of using a small line segment or a small circular arc segment to approximate a complex curved surface is the main method when the numerical control system processes a component whose surface shape is composed of a free curve.
  • the numerical control system interpolator uses linear interpolation or circular interpolation to complete the numerical control of the complex curved surface. machining. This method not only has a large amount of data transmission, but also causes a quadratic approximation error. The frequent acceleration and deceleration between the micro-segments greatly reduces the processing efficiency, and the direct interpolation technique of the parameter curve comes into being.
  • the B-spline curve is usually constructed by interpolation or least square approximation.
  • the adaptive discrimination method based on path length and angle has limited effect. In some cases, the curve will appear. The deviation from the trajectory is obviously deviated, which seriously affects the processing quality.
  • the length of each path is calculated separately. For the spline function, the path length can only be calculated by numerical integration, so that the calculation accuracy of each path is not good. If the accuracy is too high, the calculation burden is increased.
  • the interpolation may cause a large speed fluctuation at the junction of the segment and the segment; after segmenting the spline curve, only the velocity at the segmentation point is utilized.
  • Speed planning that is completely consistent with kinematic constraints cannot be obtained, because even if the exact curvature is extremely large and minimum, the trend of curvature of the segment does not necessarily match the trend of speed increase and decrease, that is, the speed limit curve may appear.
  • the speed curve that is planned based on the speed determined by each curvature extreme point does not match. If you want the planned speed curve to match the speed limit curve determined by the change trend of the curvature, it is inconvenient to adjust the parameters such as acceleration.
  • the technical problem to be solved by the present invention is to provide a numerical control system, a path planning method thereof and a computer readable storage medium, which avoids a curvature scanning process with a heavy calculation amount and an uneconomical effect, and reduces the calculation amount of the overall processing path planning of the component.
  • a technical solution adopted by the present invention is to provide a path planning method for a numerical control system, comprising: acquiring a set of original tool position points of a component processing path; and combining the previous one in the original tool position set
  • the ratio of the path length between the adjacent tool positions to the path length between the adjacent tool points and the tool position that satisfies the first predetermined range is determined as a break point, and the knife of the inflection point of the machining path
  • the locus is determined as a breakpoint; determining whether the number of cutter points in the interval formed by the adjacent breakpoint reaches a preset number; if the number of cutter points in the interval formed by the adjacent breakpoint does not reach a preset number, the adjacent points are adjacent
  • the tool point between the breakpoints is determined as a breakpoint; the breakpoint is deleted from the original set of tool points to obtain a set of target tool points; and the discrete curvature of each tool bit in the set of target tool points is obtained, and the judgment is made.
  • the discrete curvature of the knife point exceeds a preset curvature threshold; wherein the curvature threshold matches the machining maximum acceleration or the machining maximum speed of the numerical control system; if there is a discrete curvature exceeding the curvature threshold
  • the tool position whose discrete curvature exceeds the curvature threshold is set as a break point, or under a preset condition, the interval formed by the tool point whose discrete curvature exceeds the curvature threshold is processed and decelerated; all breakpoints are obtained, and the judgment is performed. Whether the number of tool points in the interval formed by the breakpoint and the adjacent breakpoint reaches a preset number. If it is reached, the preset spline is packaged for the preset number of the cutter sites. Otherwise, the tool is set. The number of loci does not reach the preset number of sections for linear encapsulation, and a complete line-spline mixing path of the part processing path is obtained.
  • a numerical control system including a processor and a memory, the memory storing program data, and the processor for executing the program data to implement the following path planning method : acquiring the original set of tool positions of the component processing path; the path length between the original tool set and the previous adjacent tool point and the path length between the next adjacent tool point
  • the tool position that satisfies the first preset range is determined as a break point, and the tool point of the inflection point of the machining path is determined as a break point; and whether the number of tool points in the interval formed by the adjacent break point reaches a preset number If the number of tool points in the formed interval does not reach the preset number, the knife between adjacent breakpoints
  • the locus is determined as a breakpoint; the breakpoint is deleted from the original set of tool points to obtain a set of target tool points; the discrete curvature of each tool point in the set of target tool points is obtained, and the discrete curvature of the tool point is
  • the preset curvature threshold matches the machining maximum acceleration or the machining maximum speed of the numerical control system; if there is a discrete curvature exceeding the curvature threshold, the cutter point whose discrete curvature exceeds the curvature threshold is set to be broken Pointing, or under predetermined conditions, processing the speed reduction process for the interval formed by the tool point whose discrete curvature exceeds the curvature threshold; obtaining all the break points, and determining the position of the interval formed by the breakpoint and the adjacent breakpoint Whether the number of points reaches the preset number. If it is reached, the preset spline package is performed on the interval where the number of the tool points reaches the preset number. Otherwise, the number of the tool positions is not up to the preset number. Get the complete line-spline mixing path for the part's machining path.
  • Another technical solution adopted by the present invention is to provide a computer readable medium storing program data, the program data being executable to implement the numerical control system as described above Path planning method.
  • the invention has the beneficial effects that, different from the prior art, the invention avoids the undesired distortion of the obtained spline curve by introducing the judgment of the adjacent path length ratio of the tool point and the unevenness of the processing path.
  • the discrete curvature and the motion constraint curvature threshold are calculated, and the portion larger than the threshold is extracted and processed separately, thereby avoiding the practice of constructing the spline curve and then segmenting the curve according to the curvature, while avoiding the heavy calculation and
  • the uneconomical curvature scanning process greatly reduces the overall amount of calculation.
  • FIG. 1 is a schematic flow chart of an embodiment of a planning method of a numerical control system according to the present invention
  • FIG. 2 is a schematic structural view of an embodiment of a numerical control system according to the present invention.
  • FIG. 3 is a block diagram showing an embodiment of a computer readable medium of the present invention.
  • FIG. 1 is a schematic flow chart of an embodiment of a method for planning a numerical control system according to the present invention.
  • the planning method of the numerical control system of the embodiment includes the following steps:
  • the components are various components that can be processed by CNC machine tools.
  • the numerical control system acquires the machining path of the part to be processed and the original tool position data of the machining path through computer aided manufacturing software (CAM), and according to the original tool position data.
  • the machining sequence is numbered, wherein the machining sequence is sequentially sorted in order from the starting tool position to the original tool point on the machining path.
  • the numerical control system puts the sorted original tool position data into a set, wherein each original tool position data in the set includes the coordinates of the tool point located in the same processing plane.
  • S102 The ratio of the path length between the original tool location and the previous adjacent tool site to the path length between the next adjacent tool site meets the first preset range The point is determined as a breakpoint, and the tool point of the inflection point of the machining path is determined as a break point.
  • determining whether the ratio of the path length between the original tool location set and the previous adjacent tool location point to the path length between the next adjacent tool location point satisfies A preset range can be achieved by the following methods:
  • the original tool position in the set is represented by P i , where i ⁇ 0, the length ratio threshold LR max is set , and the tool point P i+1 and the two adjacent tool points P i and P i+2 are acquired.
  • First distance between And the second distance Judging the first distance And the second distance Whether it is full of formula (1): If so, determine the first distance between the tool point P i+1 and the two adjacent tool points P i , P i+2 And the second distance The ratio of lengths satisfies the first preset range, and the tool point P i+1 is set as a break point.
  • the method for determining whether the tool position in the set is the inflection point of the machining path is as follows: obtaining the coordinates of the first tool point P i-2 consecutively adjacent in the machining path from the above set (x i-2 , y i -2), a second tool position coordinate points P i-1 coordinates (x i-1, y i -1) and the third blade I site of P (x i, y i), in which, i ⁇ 2.
  • the first site tool coordinate P i-2 obtained in (x i-2, y i -2), the second blade site coordinates P i-1 (x i-1, y i -1) and the second the coordinates (x i, y i) of Mito site P i into equation (2) to give the third blade position parameter c i P i of the site,
  • the process of determining whether the tool location in the set is a breakpoint further includes:
  • the angle between the angle of the original tool location and the path length of the next tool position beyond the second preset range, and the angle formed by the path formed by the two adjacent tool points exceeds The tool point of the preset threshold is determined as a break point.
  • the process of determining the tool position angle of the angle formed by the path formed by the two adjacent tool points before and after the two adjacent tool positions exceeds the preset threshold is determined as a break point as follows:
  • the machining path between the tool point P i+1 and the tool point P i , P i+2 adjacent to the machining path in the machining path is with Express, and with Vector, vector with The angle formed is set to ⁇ i . It is judged whether or not ⁇ i satisfies ⁇ i > ⁇ max , and if ⁇ i satisfies ⁇ i > ⁇ max , the tool point P i+1 is set as a break point.
  • S103 Determine whether the number of tool points in the interval formed by the adjacent breakpoint reaches a preset a quantity; if the number of tool points of the interval formed by the adjacent breakpoints does not reach the preset number, the tool point between the adjacent breakpoints is determined as a break point.
  • the order of the spline curve formed by the machining path is at least 3, and the order of the spline curve formed by the machining path below is 3 is an example of traversing the original set of tool locations.
  • the machining path is planned using a 3rd-order B-spline. Therefore, the number of tooling points in the interval formed by adjacent breakpoints that can be fitted with the 3rd-order B-spline needs to be at least 4. Traversing the original set of tool sites, determining whether the number of tool sites in the interval formed by adjacent breakpoints in the set reaches a preset number of 4. If the preset number of 4 is not reached, the two adjacent breakpoints are formed. The knife points in the interval are set to breakpoints.
  • the processing path can be planned using a spline with a spline order greater than 3, and correspondingly, the preset number of tool positions is adjusted according to the spline order.
  • S104 Deleting the breakpoint from the original set of tool positions to obtain a target tool point set.
  • breakpoints determined by S102 and S103 are deleted from the original set of tool locations to form a set of target tool sites.
  • S105 Obtain a curvature of each tool point in the set of target tool positions, and determine whether a curvature of the tool point exceeds a preset curvature threshold; wherein the curvature threshold and a maximum acceleration of processing of the numerical control system Or the processing maximum speed matches.
  • the process of obtaining the discrete curvature of the tool location in the target set is as follows: the distance between the first tool point p i-2 and the second tool point p i-1 in the target set Indicated by c, the distance between the second tool position p i-1 and the third tool point p i is represented by b, and the distance between the first tool point p i-2 and the third tool point p i Expressed as a.
  • the discrete curvature k i-1 of all the tool points p i-1 satisfying i ⁇ 2 in the target set is obtained by the formula (3).
  • the discrete curvature k i-1 of the acquired tool site p i-1 is subjected to filtering processing by a sliding filtering method.
  • the discrete curvature k i-1 of the filtered tool site p i-1 is compared with the obtained curvature threshold k thr to determine whether the discrete curvature k i-1 exceeds the curvature threshold k thr of the numerical control system.
  • a 3rd-order B-spline is used for path planning, and the preset number of tool points is 4. If there is a discrete curvature exceeding a curvature threshold, the tool point corresponding to the discrete curvature exceeding the curvature threshold is set to Breakpoint, obtain all the breakpoints obtained by the above process, and sort the breakpoints according to the serial number, and determine whether the number of the cutter points in the interval formed by the adjacent breakpoints reaches the preset number of 4, if the preset number is reached 4 Then, the B-spline encapsulation is performed on the interval formed by the adjacent breakpoints. Otherwise, the interval formed by the adjacent breakpoints is linearly encapsulated, and the packaged processing path is a series of straight-B-splines. Mixed path.
  • the third-order B-spline is used for path planning, and the preset number of tool points is 4, if there is a discrete curvature exceeding the curvature threshold, and the tool points corresponding to the discrete curvature are consecutively adjacent to each other. If the number of consecutive adjacently arranged tool sites is greater than or equal to 4, the interval formed by the tool site is fitted to the B-spline, and the processing speed of the interval is obtained by the formula (4).
  • T s is the interpolation period
  • is the specified bow height error
  • a centri is the maximum centripetal acceleration
  • J max is the maximum acceleration
  • F is the processing speed
  • k thr is the curvature threshold
  • S107 Acquire all breakpoints, and determine a location of the interval formed by the breakpoint and the adjacent breakpoint Whether the number of points reaches the preset number. If it is reached, the preset spline package is performed on the interval where the number of the tool points reaches the preset number. Otherwise, the number of the tool positions is not up to the preset number. A complete line-spline mixing path for the component processing path is obtained.
  • the third-order B-spline is used for path planning.
  • the preset number of tool points is 4, and all the breakpoints obtained by the above process are obtained, and the breakpoints are sorted according to the serial number, and the serial number is adjacent. Whether the number of tool points in the interval formed by the breakpoint reaches the preset number of 4, and if the preset number is reached 4, the B-spline package is performed on the number of the tool-points reaching the preset number of positions, otherwise, the tool-position point is The number is not up to the preset number of sections for linear packaging, and the packaged processing path is a series of straight-B-spline mixing paths.
  • the processing path can be planned using a spline with a spline order greater than 3, and correspondingly, the preset number of tool positions is adjusted according to the spline order.
  • the invention has the beneficial effects that, different from the prior art, the invention avoids the undesired distortion of the obtained spline curve by introducing the judgment of the adjacent path length ratio of the tool point and the unevenness of the processing path.
  • the discrete curvature and the motion constraint curvature threshold are calculated, and the portion larger than the threshold is extracted and processed separately, thereby avoiding the practice of constructing the spline curve and then segmenting the curve according to the curvature, while avoiding the heavy calculation and
  • the uneconomical curvature scanning process greatly reduces the overall amount of calculation.
  • the present invention also provides a numerical control system.
  • FIG. 2 is a schematic structural view of an embodiment of the numerical control system of the present invention.
  • the numerical control system 20 includes a processor 21 and a memory 22, and the processor 21 is coupled to the memory 22.
  • the memory 22 is used to store program data, and the processor 21 is configured to execute program data during operation to implement the following processing path planning method:
  • the components are various components that can be processed by CNC machine tools.
  • the processor 21 acquires a machining path of the component to be processed and original tool position data of the machining path through computer aided manufacturing software (CAM), and the original tool position data is The numbers are numbered according to the processing sequence, wherein the processing sequence is sequentially sorted by the processor 21 from the starting tool position to the order of the original tool points on the processing path.
  • the processor 21 puts the sorted original tool position data into one In the set, each of the original tool site data in the set includes coordinates of the tool site at the same processing plane.
  • processor 21 determines the ratio of the path length between the original tool location set and the previous adjacent tool location point to the path length between the next adjacent tool location point. Whether the first preset range is satisfied can be achieved by: representing the original tool position in the set by P i , where i ⁇ 0, setting the length ratio threshold LR max , acquiring the tool point P i+1 and adjacent First distance between two knife sites P i , P i+2 And the second distance The processor 21 determines the first distance And the second distance Whether it is full of formula (1): If so, determine the first distance between the tool point P i+1 and the two adjacent tool points P i , P i+2 And the second distance The ratio of lengths satisfies the first preset range, and the tool point P i+1 is set as a break point.
  • the processor 21 determines whether the tool point in the set is the inflection point of the machining path as follows: the processor 21 acquires the coordinates of the first tool point P i-2 consecutively adjacent in the machining path from the set (x) I-2 , y i-2 ), the coordinates of the second tool point P i-1 (x i-1 , y i-1 ), and the coordinates of the third tool point P i (x i , y i ), Among them, i ⁇ 2.
  • the first site tool coordinate P i-2 obtained in (x i-2, y i -2), the second blade site coordinates P i-1 (x i-1, y i -1) and the second the coordinates (x i, y i) of Mito site P i into equation (2) to give the third blade position parameter c i P i of the site,
  • the processor 21 acquires the position parameter c i of all the original tool points P i satisfying i ⁇ 2, and compares the position parameters of the two tool points adjacent to the third tool point P i before and after, if The positional parameters of two adjacent tool positions before and after the three-pole position P i satisfy one of the positive values and the other value is negative, the processor 21 determines that the third tool point is the inflection point of the machining path, and Determine it as a breakpoint.
  • the process of determining, by the processor 21, whether the tool location in the set is a breakpoint further includes:
  • the processor 21 sets the path length of the original tool location point set with the path length of the next tool point beyond the second preset range, and the angle formed by the path formed by the two adjacent tool points.
  • a tool point whose angle value exceeds a preset threshold is determined as a break point.
  • the processor 21 determines the processing path formed by the tool point P i and the adjacent tool point P i+1 according to the component type and the component processing process setting length thresholds l max and l min . Whether the length is satisfied or If yes, the processor 21 determines the processing path formed by the tool location P i and the adjacent tool site P i+1 The length exceeds the second preset range, and the tool point P i is set as a break point.
  • the machining path between the tool point P i+1 and the tool point P i , P i+2 adjacent to the machining path in the machining path is with Express, and with For the vector, will with The angle formed is set to ⁇ i .
  • the processor 21 determines whether ⁇ i satisfies ⁇ i > ⁇ max , and if ⁇ i satisfies ⁇ i > ⁇ max , the tool point P i+1 is set as a break point.
  • the order of the spline curve formed by the machining path is at least 3, and the order of the spline curve formed by the machining path below is 3 is an example of traversing the original set of tool locations.
  • the processing path is planned using a 3rd-order B-spline, and the number of tool points in the interval formed by the adjacent breakpoints that can be fitted with the 3rd-order B-spline is at least 4.
  • the processor 21 traverses the original set of tool positions to determine whether the number of tool points in the interval formed by adjacent break points in the set reaches a preset number of four. If the preset number 4 is not reached, the processor 21 sets the tool point in the interval formed by the two adjacent breakpoints as a break point.
  • the processing path can be planned using a spline with a spline order greater than 3, and correspondingly, the preset number of tool positions can also be adjusted according to the spline order.
  • the processor 21 deletes the breakpoints determined by 2 and 3 from the original set of tool locations to form a set of target tool sites.
  • the process of the processor 21 acquiring the discrete curvature of the tool location in the target set is as follows: the first tool site p i-2 and the second tool site p i-1 in the target set The distance between the second tool position p i-1 and the third tool position p i is represented by b, and the first tool position p i-2 and the third tool point p i The distance between them is indicated by a.
  • the processor 21 obtains the discrete curvature of the second tool point p i-1 according to the distances a, b, c by the formula (3), and formula (3): Where i ⁇ 2.
  • the processor 21 obtains, by the formula (3), the discrete curvatures k i-1 of all the tool points p i-1 satisfying i ⁇ 2 in the target set. Processor obtains knife p i-1 site 21 pairs of the discrete curvature k i-1 are smoothed by sliding filter system.
  • the processor 21 acquires the interpolation period T s of the numerical control system, the specified bow height error ⁇ , the maximum centripetal acceleration A centri maximum acceleration J max , and the desired speed F, and obtains the curvature threshold k thr of the numerical control system by the formula (4) ,
  • the processor 21 compares the discrete curvature k i-1 of the filtered tool site p i-1 with the acquired curvature threshold k thr to determine whether the discrete curvature k i-1 exceeds the curvature threshold k thr of the numerical control system.
  • the 3rd order B-spline is used for path planning. Therefore, at least the required number of tool sites is 4, and if the processor 21 determines that there is a discrete curvature exceeding the curvature threshold, the processor 21 will exceed The tool point corresponding to the discrete curvature of the curvature threshold is set as a break point.
  • the processor 21 obtains all the breakpoints obtained through the above steps, and sorts the breakpoints according to the serial number, and determines whether the number of the cutter points in the interval formed by the adjacent breakpoints reaches the preset number of 4, and if the preset number is reached 4
  • the processor 21 performs B-spline encapsulation on the interval formed by the adjacent breakpoints. Otherwise, the interval formed by the adjacent breakpoints is linearly encapsulated, and the processed processing path is a series of straight lines. -B spline mixing path.
  • the third-order B-spline is used for path planning, and the preset number of tool points is four. If the processor 21 determines that there is a discrete curvature exceeding the curvature threshold, and the corresponding location of the discrete curvature Continuously adjacently arranged, the number of consecutive adjacently arranged tool sites is greater than or equal to four, and the processor 21 fits the interval formed by the tool site to the B-spline, and obtains the processing of the interval by the formula (4). speed,
  • T s is the interpolation period
  • is the specified bow height error
  • a centri is the maximum centripetal acceleration
  • J max is the maximum acceleration
  • F is the processing speed
  • k thr is the curvature threshold
  • a 3rd order B-spline is used for path planning, and the preset number of tool points is 4, and the processor 21 obtains the processing speed of the interval according to formula (4).
  • the processor 21 acquires all the breakpoints obtained by the above process, and sorts the breakpoints according to the serial number, and determines whether the number of the cutter points in the interval formed by the adjacent breakpoints reaches the preset number of 4, and if When the preset number is reached 4, the processor 21 performs B-spline encapsulation on the interval in which the number of tool-cutting points reaches a preset number. Otherwise, the interval formed by the adjacent breakpoints is linearly encapsulated, and the processed processing path is A series of straight-B spline mixing paths.
  • the processing path can be planned using a spline with a spline order greater than 3, and correspondingly, the preset number of tool positions is adjusted according to the spline order.
  • the invention has the beneficial effects that, different from the prior art, the invention avoids the undesired distortion of the obtained spline curve by introducing the judgment of the adjacent path length ratio of the tool point and the unevenness of the processing path.
  • the discrete curvature and the motion constraint curvature threshold are calculated, and the portion larger than the threshold is extracted and processed separately, thereby avoiding the practice of constructing the spline curve and then segmenting the curve according to the curvature, while avoiding the heavy calculation and
  • the uneconomical curvature scanning process greatly reduces the overall amount of calculation.
  • FIG. 3 is a schematic structural diagram of an implementation of a computer readable medium provided by the present invention.
  • the computer readable medium 30 stores program data 31, which is at least one program or instruction, and the program data 31 is used to implement any of the above methods.
  • the computer readable medium may be a memory chip in a terminal, a hard disk, or a portable hard disk or other readable and writable storage tool such as a USB flash drive, an optical disk, or the like, or a server or the like.
  • the invention has the beneficial effects that, different from the prior art, the invention avoids the undesired distortion of the obtained spline curve by introducing the judgment of the adjacent path length ratio of the tool point and the unevenness of the processing path.
  • the discrete curvature and the motion constraint curvature threshold are calculated, and the portion larger than the threshold is extracted and processed separately, thereby avoiding the practice of constructing the spline curve and then segmenting the curve according to the curvature, while avoiding the heavy calculation and
  • the uneconomical curvature scanning process greatly reduces the overall amount of calculation.

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Manufacturing & Machinery (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Numerical Control (AREA)

Abstract

一种数控系统及其路径规划方法和计算机可读存储介质,包括:获取部件加工路径的刀位点集合;根据集合中与相邻刀位点之间的路径长度之比,为加工路径的凹凸性确定断点;若相邻断点之间的刀位点的数量未达到预设值;将这些刀位点设为断点;将断点从集合中删除,得到目标刀位点集合;获取目标刀位点集合中所有刀位点的离散曲率,判断离散曲率是否超过预设的曲率阈值;如果超过曲率阈值,将对应的刀位点进行处理;获取所有断点,根据断点与相邻断点形成的区间的刀位点数量是否达到预设数量对加工路径进行封装,得到加工路径的直线-样条混合路径。本发明避免了计算量繁重且效果不经济的曲率扫描过程,极大地减少了整体的计算量。

Description

数控系统及其路径规划方法和计算机可读存储介质 【技术领域】
本发明涉及数控加工领域,特别是涉及数控系统及其路径规划方法和计算机可读存储介质。
【背景技术】
使用微小线段或微小圆弧段逼近复杂曲面的方法是目前数控系统加工表面形状由自由曲线构成的部件时的主要手段,数控系统插补器使用直线插补或圆弧插补完成复杂曲面的数控加工。这种方法不仅数据传输量大,而且造成二次逼近误差,在微段之间的频繁加减速更大大降低了加工效率,参数曲线直接插补技术应运而生。随着数控技术的发展,多项式样条曲线直接插补技术、Bezier曲线直接插补技术、非均匀有理B样条(NURBS)插补技术等各种参数曲线直接插补技术日渐成熟,许多国内外数控系统生产商也在自己的数控系统中加入了这一先进的功能。
但是现有数控系统在路径规划阶段,通常采用插值或最小二乘逼近的方法构建B样条曲线,仅通过路径长度及角度的自适应判别方法效果有限,在某些情况下得到的曲线会出现明显偏离轨迹的扭曲,严重影响加工质量;样条路径分段后分别计算每段路径长度,对于样条函数,路径长度只能通过数值积分的方式计算,这样每段路径的计算精度不好确定,若精度过高,增加计算负担,若精度过低,插补时可能导致段与段的衔接处有较大的速度波动;将样条曲线分段以后,仅利用分段点处的速度并不能得到完全符合运动学约束的速度规划,因为即使得到了精确的曲率极大、极小值,但该段曲率的变化趋势并不一定与速度增减的趋势匹配,即可能出现速度限制曲线与根据每个曲率极值点确定的速度规划出来的速度曲线并不匹配的情况。如果想让规划出来的速度曲线与由曲率的变化趋势决定的速度限制曲线匹配,则需要对加速度等参数进行调整,很不方便。
【发明内容】
本发明主要解决的技术问题是提供一种数控系统及其路径规划方法和计算机可读存储介质,避免计算量繁重且效果不经济的曲率扫描过程,减少部件加工路径规划整体的计算量。
为解决上述技术问题,本发明采用的一个技术方案是:提供一种数控系统的路径规划方法,包括:获取部件加工路径的原始刀位点集合;将原始刀位点集合中的和前一个相邻的刀位点之间的路径长度与和后一个相邻的刀位点之间的路径长度之比满足第一预设范围的刀位点确定为断点,以及将加工路径的拐点的刀位点确定为断点;判断相邻断点形成的区间的刀位点的数量是否达到预设数量;如果相邻断点形成的区间的刀位点的数量未达到预设数量,将相邻断点之间的刀位点均确定为断点;将断点从原始刀位点集合中删除,得到目标刀位点集合;获取目标刀位点集合中每一个刀位点的离散曲率,判断刀位点的离散曲率是否超过预设的曲率阈值;其中,曲率阈值与数控系统的加工最大加速度或加工最大速度相匹配;如果存在超过所述曲率阈值的离散曲率,将离散曲率超过曲率阈值的刀位点设为断点,或者在预设条件下,对离散曲率超过所述曲率阈值的刀位点所形成的区间进行加工降速处理;获取所有断点,判断断点与相邻断点形成的的区间的刀位点数量是否达到预设数量,若达到,则对刀位点数量达到预设数量的的区间进行预设样条封装,否,则对刀位点数量未达到预设数量的区间进行直线封装,得到部件加工路径的完整直线-样条混合路径。
为解决上述技术问题,本发明采用的另一个技术方案是:提供一种数控系统,数控系统包括处理器以及存储器,存储器存储有程序数据,处理器用于执行所述程序数据以实现以下路径规划方法:获取部件加工路径的原始刀位点集合;将原始刀位点集合中的和前一个相邻的刀位点之间的路径长度与和后一个相邻的刀位点之间的路径长度之比满足第一预设范围的刀位点确定为断点,以及将加工路径的拐点的刀位点确定为断点;判断相邻断点形成的区间的刀位点的数量是否达到预设数量;如果形成的区间的刀位点的数量未达到预设数量,将相邻断点之间的刀 位点均确定为断点;将断点从原始刀位点集合中删除,得到目标刀位点集合;获取目标刀位点集合中每一个刀位点的离散曲率,判断刀位点的离散曲率是否超过预设的曲率阈值;其中,曲率阈值与数控系统的加工最大加速度或加工最大速度相匹配;如果存在超过所述曲率阈值的离散曲率,将离散曲率超过曲率阈值的刀位点设为断点,或者在预设条件下,对离散曲率超过所述曲率阈值的刀位点所形成的区间进行加工降速处理;获取所有断点,判断断点与相邻断点形成的区间的刀位点数量是否达到预设数量,若达到,则对刀位点数量达到预设数量的的区间进行预设样条封装,否,则对刀位点数量未达到预设数量的区间进行直线封装,得到部件加工路径的完整直线-样条混合路径。
为解决上述技术问题,本发明采用的再一个技术方案是:提供一种计算机可读介质,所述计算机可读介质存储有程序数据,所述程序数据能够被执行以实现如上所述的数控系统的路径规划方法。
本发明的有益效果是:区别于现有技术的情况,本发明通过引入刀位点相邻路径长度比例及加工路径凹凸性的判断,避免了得到的样条曲线出现不期望的扭曲。在路径规划阶段计算离散曲率及运动约束曲率阈值,将大于阈值的部分提取出来单独处理,避免了一并构建成样条曲线后再根据曲率对曲线分段的做法,同时避免了计算量繁重且效果不经济的曲率扫描过程,极大地减少了整体的计算量。
【附图说明】
图1是本发明数控系统的规划方法一实施例的流程示意图;
图2是本发明数控系统一实施例的结构示意图;
图3是本发明计算机可读介质一实施例的结构示意图。
【具体实施方式】
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,均属于本 发明保护的范围。
请参阅图1,图1是本发明数控系统的规划方法一实施例的流程示意图,本实施例的数控系统的规划方法包括如下步骤:
S101:获取部件加工路径的原始刀位点集合。
其中,部件为可通过数控机床加工的各种部件。
在需要将部件加工成预设形状和结构时,数控系统通过计算机辅助制造软件(CAM)获取待加工部件的加工路径以及该加工路径的原始刀位点数据,并且对该原始刀位点数据按照加工顺序进行编号,其中,该加工顺序为在由起始刀位点开始对原始刀位点在加工路径上的顺序依次进行排序。数控系统将排序后的原始刀位点数据放入一个集合中,其中,该集合中的每个原始刀位点数据包括该刀位点的位于同一个加工平面时的坐标。
S102:将原始刀位点集合中的和前一个相邻的刀位点之间的路径长度与和后一个相邻的刀位点之间的路径长度之比满足第一预设范围的刀位点确定为断点,以及将加工路径的拐点的刀位点确定为断点。
在一个具体的实施场景中,确定原始刀位点集合中的和前一个相邻的刀位点之间的路径长度与和后一个相邻的刀位点之间的路径长度之比是否满足第一预设范围可通过以下方法实现:
将集合中的原始刀位点以Pi表示,其中,i≥0,设置长度比例阈值LRmax,获取刀位点Pi+1与相邻两个刀位点Pi、Pi+2之间的第一距离
Figure PCTCN2017116613-appb-000001
和第二距离
Figure PCTCN2017116613-appb-000002
判断第一距离
Figure PCTCN2017116613-appb-000003
和第二距离
Figure PCTCN2017116613-appb-000004
是否满下公式(1):
Figure PCTCN2017116613-appb-000005
若满足,则确定刀位点Pi+1与相邻两个刀位点Pi、Pi+2之间的第一距离
Figure PCTCN2017116613-appb-000006
和第二距离
Figure PCTCN2017116613-appb-000007
长度之比满足第一预设范围,并将刀位点Pi+1设为断点。
判断上述集合中的刀位点是否为加工路径的拐点的方法如下:从上述集合中获取在加工路径中连续相邻的第一刀位点Pi-2的坐标(xi-2,yi-2)、第二刀位点Pi-1的坐标(xi-1,yi-1)以及第三刀位点Pi的坐标(xi,yi),其 中,i≥2。
将得到的第一刀位点Pi-2的坐标(xi-2,yi-2)、第二刀位点Pi-1的坐标(xi-1,yi-1)以及第三刀位点Pi的坐标(xi,yi)代入公式(2)得到第三刀位点Pi的位置参数ci
公式(2):ci=xi(yi-1-yi-2)+yi(xi-2-xi-1)-xi-2yi-1+xi-1yi-2,其中,i≥2
获取满足i≥2的所有原始刀位点Pi的位置参数ci,将与第三刀位点Pi前后相邻的两个刀位点的位置参数进行比较,如果与第三刀位点Pi前后相邻的两个刀位点的位置参数满足其中一个数值为正,另一个数值为负,则确定所述第三刀位点为加工路径的拐点,并将其确定为断点。
在上述实施场景中,判断上述集合中的刀位点是否为断点的过程还包括:
将原始刀位点集合中的与下一个刀位点的路径长度超出第二预设范围的刀位点,以及与前后两个相邻刀位点构成的路径所形成的夹角的角度值超过预设阈值的刀位点确定为断点。
其中,原始刀位点集合中的与下一个刀位点的路径长度超出第二预设范围的刀位点设为断点的过程如下:
根据部件类型和部件加工工艺设定长度阈值lmax和lmin,判断刀位点Pi与相邻刀位点Pi+1形成的加工路径
Figure PCTCN2017116613-appb-000008
的长度是否满足
Figure PCTCN2017116613-appb-000009
Figure PCTCN2017116613-appb-000010
若满足,则确定该刀位点Pi与相邻刀位点Pi+1形成的加工路径
Figure PCTCN2017116613-appb-000011
长度超过第二预设范围,并将刀位点Pi设为断点。
其中,将与前后两个相邻刀位点构成路径所形成的夹角的角度值超过预设阈值的刀位点确定为断点的过程如下:
根据部件类型和部件加工工艺设定角度阈值θmax,将刀位点Pi+1和与其在加工路径上前后相邻的刀位点Pi、Pi+2之间的加工路径以
Figure PCTCN2017116613-appb-000012
Figure PCTCN2017116613-appb-000013
表示,且
Figure PCTCN2017116613-appb-000014
Figure PCTCN2017116613-appb-000015
为向量,将向量
Figure PCTCN2017116613-appb-000016
Figure PCTCN2017116613-appb-000017
形成的夹角设为θi。判断θi是否满足θimax,若θi满足θimax,则将刀位点Pi+1设为断点。
S103:判断所述相邻断点形成的区间的刀位点的数量是否达到预设 数量;如果所述相邻断点形成的区间的的刀位点的数量未达到所述预设数量,将所述相邻断点之间的刀位点均确定为断点。
为使数控系统的加工器件的加速度不出现间断变化,需要使加工路径的曲率连续变化,因此,加工路径形成的样条曲线阶数至少为3,下面以加工路径形成的样条曲线阶数是3为例对原始刀位点集合进行遍历。
在一个具体的实施场景中,使用3阶B样条对加工路径进行规划,因此,可以进行3阶B样条拟合的相邻断点形成的区间的刀位点数量需要至少为4。遍历原始刀位点集合,判断该集合中相邻的断点形成的区间的刀位点数量是否达到预设数量4,若没有达到预设数量4,则将该相邻的两个断点形成的区间内的刀位点都设为断点。
在上述实施场景中,可以使用样条阶数大于3的样条对加工路径进行规划,相应的,刀位点预设数量根据样条阶数进行调整。
S104:将所述断点从所述原始刀位点集合中删除,得到目标刀位点集合。
将通过S102和S103确定的断点从原始刀位点集合中删除,形成目标刀位点集合。
S105:获取所述目标刀位点集合中每一个刀位点的曲率,判断所述刀位点的曲率是否超过预设的曲率阈值;其中,所述曲率阈值与所述数控系统的加工最大加速度或加工最大速度相匹配。
在一个具体的实施场景中,获取目标集合中的刀位点的离散曲率的过程如下:将目标集合中第一刀位点pi-2和第二刀位点pi-1之间的距离以c表示,第二刀位点pi-1和第三刀位点pi之间的距离以b表示,第一刀位点pi-2和第三刀位点pi之间的距离以a表示。根据距离a、b、c通过公式(3)得到所述第二刀位点pi-1的离散曲率,
公式(3):
Figure PCTCN2017116613-appb-000018
其中i≥2。
通过公式(3)得到目标集合中所有满足i≥2的刀位点pi-1的离散曲率ki-1。对获取的刀位点pi-1的离散曲率ki-1通过滑动滤波方式进行滤波处 理。
获取数控系统的插补周期Ts、指定的弓高误差δ、最大向心加速度Acentri最大加速度Jmax、期望速度F,通过公式(4)获取所述数控系统的曲率阈值kthr
公式(4):
Figure PCTCN2017116613-appb-000019
将滤波处理后的刀位点pi-1的离散曲率ki-1与获取的曲率阈值kthr进行对比,判断离散曲率ki-1是否超过数控系统的曲率阈值kthr
S106:如果存在超过所述曲率阈值的离散曲率,将离散曲率超过所述曲率阈值的刀位点设为断点,或者在预设条件下,对离散曲率超过所述曲率阈值的刀位点所形成的区间进行加工降速处理。
在一个具体的实施场景中,使用3阶B样条进行路径规划,刀位点预设数量为4,如果存在超过曲率阈值的离散曲率,将超过曲率阈值的离散曲率对应的刀位点设为断点,获取通过上述过程获得的所有断点,并将断点按照序号进行排序,判断序号相邻的断点形成的区间的刀位点数量是否达到预设数量4,若达到预设数量4,则对该相邻的断点形成的区间进行B样条封装,否,则对该相邻的断点形成的区间进行直线封装,封装后的加工路径即为一系列的直线-B样条混合路径。
在另一个具体的实施场景中,使用3阶B样条进行路径规划,刀位点预设数量为4,如果存在超过曲率阈值的离散曲率,且该离散曲率对应的刀位点连续相邻排列,该连续相邻排列的刀位点数量大于等于4个,则将该刀位点形成的区间拟合为B样条,并通过公式(4)获得该区间的加工速度,
公式(4):
Figure PCTCN2017116613-appb-000020
其中,Ts为插补周期,δ为指定的弓高误差,Acentri为最大向心加速度,Jmax为最大加速度,F为加工速度,kthr为曲率阈值。
S107:获取所有断点,判断所述断点与相邻断点形成的区间的刀位 点数量是否达到预设数量,若达到,则对刀位点数量达到预设数量的的区间进行预设样条封装,否,则对刀位点数量未达到预设数量的区间进行直线封装,得到所述部件加工路径的完整直线-样条混合路径。
在一个具体的实施场景中,使用3阶B样条进行路径规划,刀位点预设数量为4,获取通过上述过程获得的所有断点,并将断点按照序号进行排序,判断序号相邻的断点形成的区间的刀位点数量是否达到预设数量4,若达到预设数量4,则对刀位点数量达到预设数量的区间进行B样条封装,否,则对刀位点数量未达到预设数量的区间进行直线封装,封装后的加工路径即为一系列的直线-B样条混合路径。
在上述实施场景中,可以使用样条阶数大于3的样条对加工路径进行规划,相应的,刀位点预设数量根据样条阶数进行调整。
本发明的有益效果是:区别于现有技术的情况,本发明通过引入刀位点相邻路径长度比例及加工路径凹凸性的判断,避免了得到的样条曲线出现不期望的扭曲。在路径规划阶段计算离散曲率及运动约束曲率阈值,将大于阈值的部分提取出来单独处理,避免了一并构建成样条曲线后再根据曲率对曲线分段的做法,同时避免了计算量繁重且效果不经济的曲率扫描过程,极大地减少了整体的计算量。
基于同一发明构思,本发明还提供了一种数控系统,请参阅图2,图2是本发明数控系统一实施例的结构示意图。数控系统20包括处理器21、存储器22,处理器21耦接存储器22。存储器22用于存储程序数据,处理器21用于工作时执行程序数据以实现以下加工路径规划方法:
1:获取部件加工路径的原始刀位点集合。
其中,部件为可通过数控机床加工的各种部件。
在需要将部件加工成预设形状和结构时,处理器21通过计算机辅助制造软件(CAM)获取待加工部件的加工路径以及该加工路径的原始刀位点数据,并且对该原始刀位点数据按照加工顺序进行编号,其中,该加工顺序为在处理器21由起始刀位点开始对原始刀位点在加工路径上的顺序依次进行排序。处理器21将排序后的原始刀位点数据放入一 个集合中,其中,该集合中的每个原始刀位点数据包括该刀位点的位于同一个加工平面时的坐标。
2:将原始刀位点集合中的和前一个相邻的刀位点之间的路径长度与和后一个相邻的刀位点之间的路径长度之比满足第一预设范围的刀位点确定为断点,以及将加工路径的拐点的刀位点确定为断点。
在一个具体的实施场景中,处理器21确定原始刀位点集合中的和前一个相邻的刀位点之间的路径长度与和后一个相邻的刀位点之间的路径长度之比是否满足第一预设范围可通过以下方法实现:将集合中的原始刀位点以Pi表示,其中,i≥0,设置长度比例阈值LRmax,获取刀位点Pi+1与相邻两个刀位点Pi、Pi+2之间的第一距离
Figure PCTCN2017116613-appb-000021
以及第二距离
Figure PCTCN2017116613-appb-000022
处理器21判断第一距离
Figure PCTCN2017116613-appb-000023
和第二距离
Figure PCTCN2017116613-appb-000024
是否满下公式(1):
Figure PCTCN2017116613-appb-000025
若满足,则确定刀位点Pi+1与相邻两个刀位点Pi、Pi+2之间的第一距离
Figure PCTCN2017116613-appb-000026
和第二距离
Figure PCTCN2017116613-appb-000027
长度之比满足第一预设范围,并将刀位点Pi+1设为断点。
处理器21判断上述集合中的刀位点是否为加工路径的拐点的过程如下:处理器21从上述集合中获取在加工路径中连续相邻的第一刀位点Pi-2的坐标(xi-2,yi-2)、第二刀位点Pi-1的坐标(xi-1,yi-1)以及第三刀位点Pi的坐标(xi,yi),其中,i≥2。
将得到的第一刀位点Pi-2的坐标(xi-2,yi-2)、第二刀位点Pi-1的坐标(xi-1,yi-1)以及第三刀位点Pi的坐标(xi,yi)代入公式(2)得到第三刀位点Pi的位置参数ci
公式(2):ci=xi(yi-1-yi-2)+yi(xi-2-xi-1)-xi-2yi-1+xi-1yi-2,其中,i≥2
处理器21获取满足i≥2的所有原始刀位点Pi的位置参数ci,并将与第三刀位点Pi前后相邻的两个刀位点的位置参数进行比较,如果与第三刀位点Pi前后相邻的两个刀位点的位置参数满足其中一个数值为正,另一个数值为负,则处理器21确定所述第三刀位点为加工路径的拐点, 并将其确定为断点。
在上述实施场景中,处理器21判断上述集合中的刀位点是否为断点的过程还包括:
处理器21将原始刀位点集合中的与下一个刀位点的路径长度超出第二预设范围的刀位点,以及与前后两个相邻刀位点构成的路径所形成的夹角的角度值超过预设阈值的刀位点确定为断点。
其中,处理器21将原始刀位点集合中的与下一个刀位点的路径长度超出第二预设范围的刀位点设为断点的过程如下:
根据部件类型和部件加工工艺设定长度阈值lmax和lmin,处理器21判断刀位点Pi与相邻刀位点Pi+1形成的加工路径
Figure PCTCN2017116613-appb-000028
的长度是否满足
Figure PCTCN2017116613-appb-000030
若满足,则处理器21确定该刀位点Pi与相邻刀位点Pi+1形成的加工路径
Figure PCTCN2017116613-appb-000031
长度超过第二预设范围,并将刀位点Pi设为断点。
其中,处理器21将与前后两个相邻刀位点构成路径所形成的夹角的角度值超过预设阈值的刀位点确定为断点的过程如下:
根据部件类型和部件加工工艺设定角度阈值θmax,将刀位点Pi+1和与其在加工路径上前后相邻的刀位点Pi、Pi+2之间的加工路径以
Figure PCTCN2017116613-appb-000032
Figure PCTCN2017116613-appb-000033
表示,且
Figure PCTCN2017116613-appb-000034
Figure PCTCN2017116613-appb-000035
为向量,将
Figure PCTCN2017116613-appb-000036
Figure PCTCN2017116613-appb-000037
形成的夹角设为θi。处理器21判断θi是否满足θimax,若θi满足θimax,则将刀位点Pi+1设为断点。
3:判断所述相邻断点形成的区间的刀位点的数量是否达到预设数量;如果所述相邻断点形成的区间的刀位点的数量未达到所述预设数量,将所述相邻断点之间的刀位点均确定为断点。
为使数控系统的加工器件的加速度不出现间断变化,需要使加工路径的曲率连续变化,因此,加工路径形成的样条曲线阶数至少为3,下面以加工路径形成的样条曲线阶数是3为例对原始刀位点集合进行遍历。
在一个具体的实施场景中,使用3阶B样条对加工路径进行规划,可以进行3阶B样条拟合的相邻断点形成的区间的刀位点数量至少为4。 处理器21遍历原始刀位点集合,判断该集合中相邻的断点形成的区间的刀位点数量是否达到预设数量4。若没有达到预设数量4,则处理器21将该相邻的两个断点形成的区间内的刀位点都设为断点。
在上述实施场景中,可以使用样条阶数大于3的样条对加工路径进行规划,相应的,刀位点预设数量根据样条阶数也可以进行调整。
4:将所述断点从所述原始刀位点集合中删除,得到目标刀位点集合。
处理器21将通过2和3确定的断点从原始刀位点集合中删除,形成目标刀位点集合。
5:获取所述目标刀位点集合中每一个刀位点的曲率,判断所述刀位点的曲率是否超过预设的曲率阈值;其中,所述曲率阈值与所述数控系统的加工最大加速度或加工最大速度相匹配。
在一个具体的实施场景中,处理器21获取目标集合中的刀位点的离散曲率的过程如下:将目标集合中第一刀位点pi-2和第二刀位点pi-1之间的距离以c表示,第二刀位点pi-1和第三刀位点pi之间的距离以b表示,第一刀位点pi-2和第三刀位点pi之间的距离以a表示。处理器21根据距离a、b、c通过公式(3)得到所述第二刀位点pi-1的离散曲率,公式(3):
Figure PCTCN2017116613-appb-000038
其中i≥2。
处理器21通过公式(3)得到目标集合中所有满足i≥2的刀位点pi-1的离散曲率ki-1。处理器21对获取的刀位点pi-1的离散曲率ki-1通过滑动滤波方式进行滤波处理。
处理器21获取数控系统的插补周期Ts、指定的弓高误差δ、最大向心加速度Acentri最大加速度Jmax、期望速度F,通过公式(4)获取所述数控系统的曲率阈值kthr
公式(4):
Figure PCTCN2017116613-appb-000039
处理器21将滤波处理后的的刀位点pi-1的离散曲率ki-1与获取的曲 率阈值kthr进行对比,判断离散曲率ki-1是否超过数控系统的曲率阈值kthr
6:如果存在超过所述曲率阈值的离散曲率,将离散曲率超过所述曲率阈值的刀位点设为断点,或者在预设条件下,对离散曲率超过所述曲率阈值的刀位点所形成的区间进行加工降速处理。
在一个具体的实施场景中,使用3阶B样条进行路径规划,因此,至少需要的刀位点预设数量为4,如果处理器21确定存在超过曲率阈值的离散曲率,处理器21将超过曲率阈值的离散曲率对应的刀位点设为断点。处理器21获取通过上述步骤获得的所有断点,并将断点按照序号进行排序,判断序号相邻的断点形成的区间的刀位点数量是否达到预设数量4,若达到预设数量4,则处理器21对该相邻的断点形成的区间进行B样条封装,否,则对该该相邻的断点形成的区间进行直线封装,封装后的加工路径即为一系列的直线-B样条混合路径。
在另一个具体的实施场景中,使用3阶B样条进行路径规划,刀位点预设数量为4,如果处理器21确定存在超过曲率阈值的离散曲率,且该离散曲率对应的刀位点连续相邻排列,该连续相邻排列的刀位点数量大于等于4个,则处理器21将该刀位点形成的区间拟合为B样条,并通过公式(4)获得该区间的加工速度,
公式(4)::
Figure PCTCN2017116613-appb-000040
其中,Ts为插补周期,δ为指定的弓高误差,Acentri为最大向心加速度,Jmax为最大加速度,F为加工速度,kthr为曲率阈值。
7.获取所有断点,判断所述断点与相邻断点形成的区间的刀位点数量是否达到预设数量,若达到,则对刀位点数量达到预设数量的的区间进行预设样条封装,否,则对刀位点数量未达到预设数量的区间进行直线封装,得到所述部件加工路径的完整直线-样条混合路径。
在一个具体的实施场景中,使用3阶B样条进行路径规划,刀位点预设数量为4,处理器21根据公式(4)获得该区间的加工速度。处理器21获取通过上述过程获得的所有断点,并将断点按照序号进行排序,判断序号相邻的断点形成的区间的刀位点数量是否达到预设数量4,若 达到预设数量4,则处理器21对对刀位点数量达到预设数量的区间进行B样条封装,否,则对该相邻断点形成的区间进行直线封装,封装后的加工路径即为一系列的直线-B样条混合路径。
在上述实施场景中,可以使用样条阶数大于3的样条对加工路径进行规划,相应的,刀位点预设数量根据样条阶数进行调整。
本发明的有益效果是:区别于现有技术的情况,本发明通过引入刀位点相邻路径长度比例及加工路径凹凸性的判断,避免了得到的样条曲线出现不期望的扭曲。在路径规划阶段计算离散曲率及运动约束曲率阈值,将大于阈值的部分提取出来单独处理,避免了一并构建成样条曲线后再根据曲率对曲线分段的做法,同时避免了计算量繁重且效果不经济的曲率扫描过程,极大地减少了整体的计算量。
请参阅图3,图3是本发明提供的计算机可读介质一实施的结构示意图。计算机可读介质30中存储有程序数据31,该程序数据31为至少一个程序或指令,程序数据31用于实现上述任一方法。在一个实施例中,计算机可读介质可以是终端中的存储芯片、硬盘或者是移动硬盘或者优盘、光盘等其他可读写存储的工具,还可以是服务器等等。
本发明的有益效果是:区别于现有技术的情况,本发明通过引入刀位点相邻路径长度比例及加工路径凹凸性的判断,避免了得到的样条曲线出现不期望的扭曲。在路径规划阶段计算离散曲率及运动约束曲率阈值,将大于阈值的部分提取出来单独处理,避免了一并构建成样条曲线后再根据曲率对曲线分段的做法,同时避免了计算量繁重且效果不经济的曲率扫描过程,极大地减少了整体的计算量。
以上所述仅为本发明的实施方式,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。

Claims (18)

  1. 一种数控系统的路径规划方法,其特征在于,包括:
    获取部件加工路径的原始刀位点集合;
    将所述原始刀位点集合中的和前一个相邻的刀位点之间的路径长度与和后一个相邻的刀位点之间的路径长度之比满足第一预设范围的刀位点确定为断点,以及将所述加工路径的拐点的刀位点确定为断点;
    判断所述相邻断点形成的区间的刀位点的数量是否达到预设数量;如果所述相邻断点形成的区间的刀位点的数量未达到所述预设数量,将所述相邻断点之间的刀位点均确定为断点;
    将所述断点从所述原始刀位点集合中删除,得到目标刀位点集合;
    获取所述目标刀位点集合中每一个刀位点的离散曲率,判断所述刀位点的离散曲率是否超过预设的曲率阈值;其中,所述曲率阈值与所述数控系统的加工最大加速度或加工最大速度相匹配;
    如果存在超过所述曲率阈值的离散曲率,将离散曲率超过所述曲率阈值的刀位点设为断点,或者在预设条件下,对离散曲率超过所述曲率阈值的刀位点所形成的区间进行加工降速处理;
    获取所有断点,判断所述断点与相邻断点形成区间的刀位点数量是否达到预设数量,若达到,则对刀位点数量达到预设数量的区间进行预设样条封装,否,则对刀位点数量未达到预设数量的区间进行直线封装,得到所述部件加工路径的完整直线-样条混合路径。
  2. 根据权利要求1所述的路径规划方法,其特征在于,所述将所述原始刀位点集合中的和前一个相邻的刀位点之间的路径长度与和后一个相邻的刀位点之间的路径长度之比满足第一预设范围的刀位点确定为断点的步骤具体包括:
    设置比例阈值LRmax,获取刀位点Pi+1与相邻两个刀位点Pi以及Pi+2之间的第一距离
    Figure PCTCN2017116613-appb-100001
    以及第二距离
    Figure PCTCN2017116613-appb-100002
    判断所述第一距离
    Figure PCTCN2017116613-appb-100003
    和所述第二距离
    Figure PCTCN2017116613-appb-100004
    是否满足如下公式 (1):
    Figure PCTCN2017116613-appb-100005
    若满足,则将所述刀位点Pi+1确定为断点。
  3. 根据权利要求1所述的路径规划方法,其特征在于,所述将所述加工路径的拐点的刀位点确定为断点的步骤具体包括:
    从所述原始刀位点集合中获取连续相邻的第一刀位点Pi-2的坐标(xi-2,yi-2)、第二刀位点Pi-1的坐标(xi-1,yi-1)以及第三刀位点Pi的坐标(xi,yi);
    根据所述第一刀位点的坐标,所述第二刀位点的坐标以及所述第三刀位点的坐标,并根据公式(2)计算得到所述第三刀位点Pi的位置参数ci
    公式(2):ci=xi(yi-1-yi-2)+yi(xi-2-xi-1)-xi-2yi-1+xi-1yi-2,其中i≥2;
    将所述位置参数ci与所述第三刀位点前后相邻的两个刀位点的位置参数进行比较,如果与所述前后相邻的两个刀位点的位置参数中的至少一个极性相反时,确定所述第三刀位点为断点。
  4. 根据权利要求1所述的路径规划方法,其特征在于,所述获取部件加工路径的原始刀位点集合的步骤之后,所述判断所述相邻断点形成的区间的刀位点的数量是否达到预设数量的步骤之前还包括:
    将所述原始刀位点集合中的与下一个刀位点的路径长度超出第二预设范围的刀位点确定为断点,以及将与前后两个相邻刀位点构成路径所形成的夹角的角度值超过预设阈值的刀位点确定为断点。
  5. 根据权利要求1所述的路径规划方法,其特征在于,获取所述目标刀位点集合中每一个刀位点的离散曲率的步骤具体包括:
    获取所述第一刀位点pi-2和第二刀位点pi-1之间的距离c、第二刀位点pi-1和第三刀位点pi之间的距离b、第一刀位点pi-2和第三刀位点pi之间的距离a;
    根据所述距离a、b、c通过公式(3)得到所述第二刀位点pi-1的离散曲率;
    公式(3):
    Figure PCTCN2017116613-appb-100006
    ,其中i≥2。
  6. 根据权利要求1所述的路径规划方法,其特征在于,所述获取所述目标刀位点集合中每一个刀位点的离散曲率的步骤之后还包括:
    通过滑动平均滤波方式对所述刀位点的离散曲率进行滤波处理。
  7. 根据权利要求1所述的路径规划方法,其特征在于,所述判断所述刀位点的离散曲率是否超过预设的曲率阈值的步骤具体包括:
    获取所述数控系统的插补周期Ts、指定的弓高误差δ、最大向心加速度Acentri最大加速度Jmax、期望速度F,通过公式(4)获取所述数控系统的曲率阈值kthr
    公式(4):
    Figure PCTCN2017116613-appb-100007
    将所述目标刀位点集合中每一个刀位点的离散曲率与所述曲率的阈值kthr进行对比,判断所述刀位点的离散曲率是否超过所述曲率的阈值kthr
  8. 根据权利要求1所述的路径规划方法,其特征在于,所述在预设条件下,对离散曲率超过所述曲率阈值的刀位点所形成的区间进行加工降速处理的步骤具体还包括:
    若离散曲率超过所述曲率阈值的刀位点连续相邻,且所述刀位点数量达到所述预设数量,则将所述刀位点形成的区间拟合为样条,并通过公式(4)得出该区间的加工速度,
    公式(4):
    Figure PCTCN2017116613-appb-100008
    其中,Ts为插补周期,δ为指定的弓高误差,Acentri为最大向心加速度,Jmax为最大加速度,F为加工速度,kthr为曲率阈值。
  9. 根据权利要求1所述的路径规划方法,其特征在于,所述获取部件加工路径的原始刀位点集合的步骤具体包括:
    获取部件加工路径的原始刀位点数据;
    对所述刀位点数据按照加工顺序进行编号,得到包括标号的原始刀位点集合,其中,所述原始刀位点集合包括每一个所述刀位点的坐标。
  10. 一种数控系统,所述数控系统包括处理器以及存储器,其特征在于,
    所述存储器用于存储程序数据;所述处理器用于执行所述程序数据以实现以下路径规划方法:
    获取部件加工路径的原始刀位点集合;
    将所述原始刀位点集合中的和前一个相邻的刀位点之间的路径长度与和后一个相邻的刀位点之间的路径长度之比满足第一预设范围的刀位点确定为断点,以及将所述加工路径的拐点的刀位点确定为断点;判断所述相邻断点之间的刀位点的数量是否达到预设数量;如果所述相邻断点之间的刀位点的数量未达到所述预设数量,将所述相邻断点之间的刀位点均确定为断点;
    将所述断点从所述原始刀位点集合中删除,得到目标刀位点集合;
    获取所述目标刀位点集合中每一个刀位点的离散曲率,判断所述刀位点的离散曲率是否超过预设的曲率阈值;其中,所述曲率阈值与所述数控系统的加工最大加速度或加工最大速度相匹配;
    如果存在超过所述曲率阈值的离散曲率,将离散曲率超过所述曲率阈值的刀位点设为断点,或者在预设条件下,对离散曲率超过所述曲率阈值的刀位点所形成的区间进行加工降速处理;
    获取所有断点,判断所述断点与相邻断点形成区间的刀位点数量是否达到预设数量,若达到,则对刀位点数量达到预设数量的区间进行预设样条封装,否,则对刀位点数量未达到预设数量的区间进行直线封装,得到所述部件加工路径的完整直线-样条混合路径。
  11. 根据权利要求10所述的数控系统,其特征在于,所述处理器具体用于执行:
    将所述原始刀位点集合中的和前一个相邻的刀位点之间的路径长度与和后一个相邻的刀位点之间的路径长度之比满足第一预设范围的刀位点确定为断点的步骤具体包括:
    设置比例阈值LRmax,获取刀位点Pi+1与相邻两个刀位点Pi以及Pi+2之间的第一距离
    Figure PCTCN2017116613-appb-100009
    以及第二距离
    Figure PCTCN2017116613-appb-100010
    判断所述第一距离
    Figure PCTCN2017116613-appb-100011
    和所述第二距离
    Figure PCTCN2017116613-appb-100012
    是否满足如下公式(1):
    Figure PCTCN2017116613-appb-100013
    (1),若满足,则将所述刀位点Pi+1确定为断点。
  12. 根据权利要求10所述的数控系统,其特征在于,所述处理器具体用于执行:
    将所述加工路径的拐点的刀位点确定为断点的步骤具体包括:
    从所述原始刀位点集合中获取连续相邻的第一刀位点Pi-2的坐标(xi-2,yi-2)、第二刀位点Pi-1的坐标(xi-1,yi-1)以及第三刀位点Pi的坐标(xi,yi);
    根据所述第一刀位点的坐标,所述第二刀位点的坐标以及所述第三刀位点的坐标,并根据公式(2)得到所述第三刀位点Pi的位置参数ci,公式(2):ci=xi(yi-1-yi-2)+yi(xi-2-xi-1)-xi-2yi-1+xi-1yi-2,其中i≥2;
    将所述位置参数ci与所述第三刀位点前后相邻的两个刀位点的位置参数进行比较,如果与所述前后相邻的两个刀位点的位置参数中的至少一个极性相反时,则确定所述第三刀位点为断点。
  13. 根据权利要求10所述的数控系统,其特征在于,所述处理器在执行获取部件加工路径的原始刀位点集合的步骤之后,判断所述相邻断点形成区间的刀位点的数量是否达到预设数量的步骤之前,还用于执行:
    将所述原始刀位点集合中的与下一个刀位点的路径长度超出第二预设范围的刀位点确定为断点,以及将前后两个相邻刀位点构成路径所形成的夹角的角度值超过预设阈值的刀位点确定为断点。
  14. 根据权利要求10所述的数控系统,其特征在于,所述处理器具体用于执行:
    获取所述第一刀位点pi-2和第二刀位点pi-1之间的距离c、第二刀位点pi-1和第三刀位点pi之间的距离b、第一刀位点pi-2和第三刀位点pi之间的距离a;
    根据所述距离a、b、c通过公式(3)得到所述第二刀位点pi-1的离 散曲率;
    公式(3):
    Figure PCTCN2017116613-appb-100014
    其中i≥2。
  15. 根据权利要求10所述的数控系统,其特征在于,所述处理器用于在执行获取所述目标刀位点集合中每一个刀位点的曲率,形成曲率曲线的步骤之后还用于执行:
    通过滑动平均滤波方式对所述刀位点的离散曲率ki进行滤波处理。
  16. 根据权利要求10所述的数控系统,其特征在于,所述处理器具体用于执行:
    获取所述数控系统的插补周期Ts、指定的弓高误差δ、最大向心加速度Acentri最大加速度Jmax、期望速度F,通过公式(4)获取所述数控系统的曲率阈值kthr
    公式(4):
    Figure PCTCN2017116613-appb-100015
    将所述目标刀位点集合中每一个刀位点的离散曲率与所述曲率的阈值kthr进行对比,判断所述刀位点的离散曲率是否超过所述曲率的阈值kthr
  17. 根据权利要求10所述的数控系统,其特征在于,所述处理器还用于执行:
    所述在预设条件下,对离散曲率超过所述曲率阈值的刀位点所形成的区间进行加工降速处理的步骤具体还包括:
    若离散曲率超过所述曲率阈值的刀位点连续相邻,且所述刀位点数量达到所述预设数量,则将所述刀位点形成的区间拟合为样条,并通过公式(4)得出该区间的加工速度,
    公式(4):
    Figure PCTCN2017116613-appb-100016
    其中,Ts为插补周期,δ为指定的弓高误差,Acentri为最大向心加速度,Jmax为最大加速度,F为加工速度,kthr为曲率阈值。
  18. 一种计算机可读存储介质,其特征在于,存储有程序数据,所述程序数据能够被执行以实现如权利要求1-9所述的数控系统的路径规划方法。
PCT/CN2017/116613 2017-12-15 2017-12-15 数控系统及其路径规划方法和计算机可读存储介质 WO2019113972A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2017/116613 WO2019113972A1 (zh) 2017-12-15 2017-12-15 数控系统及其路径规划方法和计算机可读存储介质
CN201780034480.5A CN109496286B (zh) 2017-12-15 2017-12-15 数控系统及其路径规划方法和计算机可读存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/116613 WO2019113972A1 (zh) 2017-12-15 2017-12-15 数控系统及其路径规划方法和计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2019113972A1 true WO2019113972A1 (zh) 2019-06-20

Family

ID=65689122

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/116613 WO2019113972A1 (zh) 2017-12-15 2017-12-15 数控系统及其路径规划方法和计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN109496286B (zh)
WO (1) WO2019113972A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114609966A (zh) * 2022-03-11 2022-06-10 深圳数马电子技术有限公司 一种刀具数控磨削中的路径规划方法、装置和计算机设备

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111487928B (zh) * 2020-04-24 2021-04-20 华中科技大学 一种基于刀位点增删改指令的数控加工轨迹平滑方法
CN112650147B (zh) * 2020-12-28 2023-11-28 深圳数马电子技术有限公司 一种曲率限制下的最大速度参数限制方法以及装置
CN112947295B (zh) * 2021-03-03 2022-08-05 湘潭大学 一种基于样条刀具轨迹曲率划分区间方法
CN116339242B (zh) * 2023-05-30 2023-08-18 中科航迈数控软件(深圳)有限公司 一种自由曲面刀具路径生成方法及相关设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104007705A (zh) * 2014-05-05 2014-08-27 上海交通大学 小线段路径压缩平滑的前瞻插补系统
CN105425725A (zh) * 2015-12-09 2016-03-23 华中科技大学 一种离散刀具轨迹的曲线拟合方法
CN105629876A (zh) * 2016-02-16 2016-06-01 华侨大学 一种三角网格模型数控加工的多刀具优化组合选择方法
CN106569456A (zh) * 2015-10-13 2017-04-19 中国科学院沈阳自动化研究所 一种适用于双螺旋轨迹的加工区域分割及轨迹连接方法

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3593850B2 (ja) * 1996-06-17 2004-11-24 トヨタ自動車株式会社 工具点列発生方法
CN101995850B (zh) * 2010-11-05 2012-02-29 江俊逢 一种计算机辅助数字控制方法与系统
CN104331025B (zh) * 2014-10-31 2017-01-25 西安交通大学 一种面向微小线段高效加工的速度前瞻预处理方法
WO2017113195A1 (zh) * 2015-12-30 2017-07-06 深圳配天智能技术研究院有限公司 一种加工路径规划方法、加工路径规划装置及数控机床
CN105955194B (zh) * 2016-05-10 2018-09-04 大连理工大学 一种离散加工路径的拐点平滑方法
CN107065780B (zh) * 2017-05-31 2019-07-19 铜仁市万山区丹凤朱砂工艺品研发检测鉴定中心有限公司 一种根据加工路径生成操作代码的方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104007705A (zh) * 2014-05-05 2014-08-27 上海交通大学 小线段路径压缩平滑的前瞻插补系统
CN106569456A (zh) * 2015-10-13 2017-04-19 中国科学院沈阳自动化研究所 一种适用于双螺旋轨迹的加工区域分割及轨迹连接方法
CN105425725A (zh) * 2015-12-09 2016-03-23 华中科技大学 一种离散刀具轨迹的曲线拟合方法
CN105629876A (zh) * 2016-02-16 2016-06-01 华侨大学 一种三角网格模型数控加工的多刀具优化组合选择方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114609966A (zh) * 2022-03-11 2022-06-10 深圳数马电子技术有限公司 一种刀具数控磨削中的路径规划方法、装置和计算机设备
CN114609966B (zh) * 2022-03-11 2023-08-08 深圳数马电子技术有限公司 一种刀具数控磨削中的路径规划方法、装置和计算机设备

Also Published As

Publication number Publication date
CN109496286A (zh) 2019-03-19
CN109496286B (zh) 2021-07-09

Similar Documents

Publication Publication Date Title
WO2019113972A1 (zh) 数控系统及其路径规划方法和计算机可读存储介质
US10768602B2 (en) Curve velocity planning method, device, and numerical control machining route data processing method thereof
CN106814694B (zh) 一种高速高精度的参数曲线前瞻插补方法
WO2019119268A1 (zh) 数控系统、具有存储功能的装置及nurbs曲线插补方法
WO2020124606A1 (zh) 数控加工方法及系统、具有存储功能的装置
CN113687629B (zh) 激光cam加工的圆弧直线拟合方法、系统、设备及存储介质
CN102527554A (zh) 一种自由曲面喷涂机器人的喷枪轨迹规划方法
CN102640067A (zh) 刀具路径的形成方法和装置
CN112486101B (zh) Nurbs曲线自适应前瞻插补方法
CN113276130B (zh) 一种基于点云切片的自由曲面喷涂路径规划方法及系统
CN114237161B (zh) 一种基于数字滤波的工业机器人nurbs曲线插补方法
CN113953685A (zh) 一种平面板材激光切割路径规划方法
JP2001034319A (ja) 軌跡制御装置
WO2023134131A1 (zh) 基于五轴联动机床的异形注塑件合模线加工方法及装置
CN109697272B (zh) 一种简易的二次b样条曲线拟合方法
CN110142880A (zh) 一种用于切削设备的回退实时跟随控制方法
TWI541623B (zh) 五軸加工數值控制系統及其數值控制方法
CN110262406B (zh) 一种裁床的拐弯速度优化方法及装置
CN115587441B (zh) 一种流道结构增减材复合制造工艺规划方法及系统
CN112987654B (zh) 人造石数控加工编程方法
CN113946139A (zh) 数控系统的速度预测、数控系统的控制方法及数控系统
CN112000063B (zh) 一种模具分层清角数控加工系统及其工艺方法
US11787051B2 (en) Method for automatically processing structure-reinforcing member of aircraft
CN106354096B (zh) 基于数控加工系统的dxf图形的引导线自动识别的方法
CN117900917B (zh) 一种打磨轨迹离散化方法、系统、终端及可读存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17934557

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17934557

Country of ref document: EP

Kind code of ref document: A1