CN113759824B - Error constraint-based trajectory optimization method and system - Google Patents

Error constraint-based trajectory optimization method and system Download PDF

Info

Publication number
CN113759824B
CN113759824B CN202111141704.7A CN202111141704A CN113759824B CN 113759824 B CN113759824 B CN 113759824B CN 202111141704 A CN202111141704 A CN 202111141704A CN 113759824 B CN113759824 B CN 113759824B
Authority
CN
China
Prior art keywords
straight line
executing
line segment
fitting
straight
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202111141704.7A
Other languages
Chinese (zh)
Other versions
CN113759824A (en
Inventor
程浩
曹荣刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SUZHOU GUFUDAO AUTOMATION TECHNOLOGY CO LTD
Original Assignee
SUZHOU GUFUDAO AUTOMATION TECHNOLOGY CO LTD
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 SUZHOU GUFUDAO AUTOMATION TECHNOLOGY CO LTD filed Critical SUZHOU GUFUDAO AUTOMATION TECHNOLOGY CO LTD
Priority to CN202111141704.7A priority Critical patent/CN113759824B/en
Publication of CN113759824A publication Critical patent/CN113759824A/en
Application granted granted Critical
Publication of CN113759824B publication Critical patent/CN113759824B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/404Numerical 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 control arrangements for compensation, e.g. for backlash, overshoot, tool offset, tool wear, temperature, machine construction errors, load, inertia
    • 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/31From computer integrated manufacturing till monitoring
    • G05B2219/31434Zone supervisor, collects error signals from, and diagnoses different zone
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

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

The present disclosure provides a trajectory optimization method and system based on error constraint, the method includes: s1: removing dead points in an NC program, merging the original straight line segments after the dead points are removed, and outputting the merged straight line segments; s2: screening the straight line segments output in the step S1, and selecting spline fitting demarcation points; s3: and fitting and splicing the straight line segments with the spline fitting boundary points to obtain an optimized processing track. According to the method, a large number of small straight line segments are fitted into a spline curve within a given error constraint range, the calculation efficiency is high, the programming algorithm is simple, the method is convenient to apply and popularize, the smoothness and the smoothness of a machining track can be improved, the machining efficiency and the machining quality of products are high, and meanwhile, the movement of a machine tool can be more stable.

Description

Error constraint-based trajectory optimization method and system
Technical Field
The disclosure relates to the technical field of numerical control machining, in particular to a track optimization method and system based on error constraint.
Background
In the traditional numerical control machining process, for a machined part with a complex curved surface, continuous tiny straight line segments are generated to approximate an original curve by CAD (computer aided design) or CAM (computer-aided manufacturing) software according to the requirement of machining profile errors. When the requirement on machining precision is high, the generated small straight line section codes have the characteristics of large data volume and short length, discontinuity between adjacent small straight line sections not only destroys the smoothness of a curve, but also causes discontinuity of speed and acceleration instructions output to a servo motor by a numerical control system in the machining process, so that the numerical control system needs frequent acceleration and deceleration in small and micro section machining, and is difficult to adapt to the requirements on modern high-speed and high-precision machining.
Disclosure of Invention
Aiming at the problems, the disclosure provides a trajectory optimization method and system based on error constraint.
In order to solve at least one of the above technical problems, the present disclosure proposes the following technical solutions:
in a first aspect, a method for trajectory optimization based on error constraints is provided, the method comprising the steps of:
s1: removing dead points in an NC program, merging the original straight line segments after the dead points are removed, and outputting the merged straight line segments;
s2: screening the straight line segments output in the step S1, and selecting spline fitting boundary points;
s3: and fitting and splicing the straight line segments with the spline fitting boundary points to obtain an optimized processing track.
In a second aspect, an error constraint-based trajectory optimization system is provided for performing any one of the above error constraint-based trajectory optimization methods, the system comprising:
the dead pixel removing module is used for removing dead pixels in the NC program, combining the original straight line segments after the dead pixels are removed and outputting the combined straight line segments;
the data selection module is used for screening the straight line segments output by the dead pixel removal module and selecting spline fitting boundary points; and
and the spline fitting module is used for fitting and splicing the straight line sections with the spline fitting boundary points selected to obtain the optimized processing track.
In a third aspect, an apparatus for error constraint based trajectory optimization is provided, the apparatus comprising at least one processor, and a memory communicatively coupled to the at least one processor, wherein the memory stores at least one instruction, at least one program, code set, or instruction set, and the at least one instruction, the at least one program, code set, or instruction set is loaded by the processor and executes any one of the error constraint based trajectory optimization methods of the present disclosure.
In a fourth aspect, a computer-readable storage medium is provided, in which at least one instruction, at least one program, code set, or instruction set is stored, and the at least one instruction, the at least one program, code set, or instruction set is loaded by a processor and executes any one of the above-mentioned error constraint-based trajectory optimization methods of the present disclosure.
The method has the advantages that a large number of tiny linear segments are fitted into a spline curve within a given error constraint range, the calculation efficiency is high, the programming algorithm is simple, the method is convenient to apply and popularize, the smoothness and the smoothness of a machining track can be improved, the machining efficiency and the machining quality of products are further high, and meanwhile, the movement of a machine tool can be more stable.
In addition, in the technical solutions of the present disclosure, the technical solutions can be implemented by adopting conventional means in the art, unless otherwise specified.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a trajectory optimization method based on error constraints according to an embodiment of the present disclosure.
Fig. 2 is a flowchart of a step S1 of a trajectory optimization method based on error constraints according to an embodiment of the present disclosure.
Fig. 3 is a flowchart of step S2 of the trajectory optimization method based on error constraints according to an embodiment of the present disclosure.
Fig. 4 is a flowchart of step S3 of the trajectory optimization method based on error constraints according to an embodiment of the present disclosure.
Fig. 5 is a machining procedure used in an example of embodiment 1 of the present disclosure.
FIG. 6 is a velocity time curve of the X-axis at a constant velocity stage when the trajectory optimization method based on error constraints provided by the present disclosure is not used in the processing program shown in FIG. 5.
FIG. 7 is a velocity time curve of the X-axis at the uniform velocity stage when the processing program shown in FIG. 5 is used in the method for optimizing a trajectory based on error constraints provided by the present disclosure.
FIG. 8 is a diagram of a trajectory optimization system based on error constraints according to an embodiment of the present disclosure.
Fig. 9 is a schematic structural diagram of an apparatus for trajectory optimization based on error constraints according to an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below with reference to the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are merely illustrative of some, but not all, embodiments of the disclosure and are not to be considered as limiting the disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
It should be noted that the terms "comprises" and "comprising," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or server that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1:
referring to the drawings 1-4 in the specification, a method for optimizing a trajectory based on error constraints provided by one embodiment of the present application is illustrated, and the method may include the following steps:
s1: and removing dead points in the NC program, merging the original straight line segments after the dead points are removed, and outputting the merged straight line segments.
Burrs, namely dead spots, often appear at the surface splicing positions in NC programs generated by software such as CAD or CAM. The original straight-line segment where the dead pixel is located is short and is locally dense, fitting quality can be affected by direct participation in fitting, even the track obtained by fitting is seriously deformed, the dead pixel is removed before fitting, the fitting quality can be improved, the smoothness and the smoothness of the machining track are improved, and further the machining efficiency and the machining quality of products are improved.
In an optional embodiment, step S1 may specifically include:
s101: acquiring an ith original straight-line segment in an NC program, and solving the length l (i) of the original straight-line segment, wherein i =1,2,3 …;
s102: solving the maximum merging error after merging the 1 st original straight-line segment to the ith original straight-line segment, wherein the maximum merging error is the maximum deviation value generated by comparing the track of the merged straight-line segment with the track of the original straight-line segment;
s103: judging whether the maximum merging error is smaller than a preset maximum merging error threshold value or not, if the maximum merging error is not smaller than the preset maximum merging error threshold value, executing S104, and if the maximum merging error is smaller than the preset maximum merging error threshold value, executing S105;
s104: merging the 1 st original straight line segment to the (i-1) th original straight line segment, and executing S108;
s105: calculating the total length L = sigma L (i) of straight-line segments from the 1 st original straight-line segment to the ith original straight-line segment;
s106: judging whether the total length L of the straight-line segments is greater than a preset total length threshold of the straight-line segments, if so, executing S107, if not, returning to executing S101, if so, making i = i +1, namely, sequentially acquiring the next original straight-line segment, and repeatedly executing the steps S101 to S106;
s107: merging the 1 st straight-line segment to the ith straight-line segment, and executing S108;
s108: and outputting the combined straight line segment.
S2: and (4) screening the straight line segments output in the step (S1), and selecting spline fitting boundary points.
Specifically, the spline fitting boundary points are selected from straight line segment endpoints, and all straight line segment endpoints in the middle of adjacent spline fitting boundary points can be continuously fitted.
From this, through selecting spline fitting boundary point, carry out data preparation for the fitting in step S3 and concatenation, through selecting spline fitting boundary point, can fit straightway in succession and can not fit straightway in succession and filter, the subsequent fitting of being convenient for satisfies the requirement of numerical control real-time and fitting error restraint simultaneously.
In an alternative embodiment, step S2 may specifically include,
s201: acquiring a straight line segment, wherein the straight line segment is output in the step S1, and calculating the length l' of the straight line segment to execute S202;
s202: judging whether the length l' of the straight line segment is greater than a preset length threshold value or not, if so, executing S207, and if not, executing S203;
s203: judging whether other straight line segments exist in the first cache, if the straight line segments do not exist in the first cache, executing step S204, and if the straight line segments exist in the first cache, executing step S205, wherein the first cache is a cache space for caching the straight line segments;
s204: storing the current straight line segment into a first cache, returning to execute the step S201, acquiring the straight line segments output by the next step S1 in sequence at the moment, and repeating the steps S201 to S203;
s205: calculating the included angle a between the current straight line segment and the straight line segment in the first cache,
s206: judging whether the included angle a is smaller than a preset included angle threshold value, if the included angle a is not smaller than the preset included angle threshold value, executing the step S207, and if the included angle a is smaller than the preset included angle threshold value, executing the step S209;
s207: selecting a connection point in the current straight-line segment as a spline fitting boundary point, and executing S208, wherein the connection point refers to the starting point of the current straight-line segment;
s208: outputting the straight line segment in the first cache, and executing step S209;
s209: the current straight line segment is updated to the first cache.
S3: and fitting and splicing the straight line segments with the spline fitting boundary points to obtain an optimized processing track.
In an optional embodiment, a cubic NURBS spline can be selected as a fitting basis for fitting the straight line segment, and the cubic NURBS spline has the characteristics of integral second-order continuity and can meet the requirements on the continuity of the trajectory fitting speed and the acceleration; meanwhile, the cubic NURBS spline has small calculation amount and can meet the real-time requirement of a numerical control system.
In an alternative embodiment, step S13 may specifically include the following steps:
s301: acquiring the straight line segment output in the step S2;
s302: judging whether the terminal point of the current straight-line segment is a spline fitting boundary point, if so, executing S303, and if not, executing S304;
s303: adding the current straight line segment into a second cache, taking the endpoint of the straight line segment in the second cache as fitting data for fitting, and executing S307;
s304: adding the current straight line segment into a second cache, and executing S305;
s305: judging whether the total endpoint number of the straight line segments in the second cache is equal to twice of the primary fitting control point number n, if so, executing a step S306, and if not, returning to the step S301, wherein the primary fitting control point number is the straight line segment endpoint number required by the primary fitting;
s306: fitting the first n straight line segment endpoints in the second cache as fitting data to generate a fitting result and executing S307;
s307: judging whether the initial point in the fitting result is a spline fitting boundary point, if not, executing S308; if the starting point in the fitting result is a spline fitting boundary point, executing step S309;
s308: adding a cached intersection point at the head of the fitting result, and executing S309;
s309: taking a control point as the starting point, and executing step S310, wherein taking a control point as the starting point means that the starting point of the fitting result is copied once and added before the starting point of the fitting result;
s310: judging whether the end point in the fitting result is a spline fitting boundary point, if so, executing step S311, and if not, executing step S312;
s311: executing S312 by taking a control point as the end point, wherein taking the control point as the end point means copying the end point of the fitting result once and adding the end point of the fitting result;
s312: acquiring the number N of actual fitting control points calculated by the fitting, and executing the step S313;
s313: initializing a NURBS node vector by using an accumulated chord length method;
s314: taking the end points of the straight-line segments as control points, and taking the weight of each control point as 1 to obtain the integral fitting NURBS spline curve;
s315: calculating the deviation Error [ j ] between each node vector position and a straight line section in the fitting NURBS spline curve, wherein j =1,2,3 … and N-2,N-1;
s316: judging whether Error [ j ] is larger than a preset maximum deviation value or not, if so, executing S317, and if not, executing S318;
s317: adding a control point to the middle point of the longer straight line segment in the two adjacent straight line segments at the point j, and returning to execute S313;
s318: judging whether the end point of fitting the NURBS spline curve is a spline fitting boundary point or not, if so, executing S319, otherwise, executing S320;
s319: outputting a fitted NURBS spline curve, wherein the endpoint of the fitted NURBS spline curve is a spline fitting dividing point, which indicates that the current continuously-fittable area is finished, and splines before and after the spline fitting dividing point are not spliced, so that the fitted NURBS spline curve is directly output;
s320: and (5) caching and fitting the first 9 control points of the NURBS spline curve as the cross points, and outputting the tracks between the first cross points and the last cross points.
And (3) sequentially executing the steps S1 to S3 on the straight line segments in the original processing track until the spline curve output in the step S3 and the track between the cross points form a complete processing track. Therefore, in each continuous fitting area, namely the area between two adjacent spline fitting dividing points, only a specific number of straight-line segments are fitted each time, meanwhile, the intersection points are cached, the continuity of the fitting track is guaranteed by adopting a spline cross splicing mode, the continuity of the second order at the splicing position by twice fitting is guaranteed simultaneously by spline cross splicing, and therefore the fact that the straight-line segments in one continuous fitting area can be continuous in the whole second order is guaranteed. The method has the advantages of simple algorithm and high calculation efficiency due to programming, and can also meet the real-time requirement of the numerical control system.
In an alternative embodiment, the value range of the number n of the one-time fitting control points can be n ≧ 15.
In an alternative embodiment, initializing the NURBS node vectors in step S313 may use the cumulative chord length method. When the accumulated chord length method is used, the chord length u [1] =0 is accumulated in step S308, and the chord length u [ N-1] = u [ N-2] is accumulated in step S311. In general, when the number of actual fitting control points is N, the NURBS node vector is initialized to 0, u [1], u [2], …, u [ N-2], u [ N-1], u [ N-1], u [ N-1].
The beneficial effects of this disclosure are that, in given error constraint range, form the spline curve with a large amount of little straightways through fitting and alternately concatenation, the computational efficiency is high, and programming algorithm is simple, and the smooth nature and the smoothness nature of processing orbit can be promoted in the smooth nature and the nature of being convenient for use and popularization, and then machining efficiency and the processingquality of high product can make the lathe motion more steady simultaneously.
The spline track optimized by the method provided by the disclosure is described by referring to the drawings 5-7 in the specification and taking the machining program shown in the drawing 5 in the specification as an example. Description figure 5 shows the original trajectory of a circular arc generated by a small straight line segment. When the original trajectory adopts straight line interpolation, because adjacent straight line segments have corners, the speed of the axis at the corners has abrupt change, and in the constant speed stage, the speed time curve of the X axis is shown in the attached figure 6 of the specification, wherein the horizontal axis represents time, and the vertical axis represents speed. As shown in the attached figure 6 of the specification, the whole speed curve is in a sawtooth shape, and the dynamic precision of the numerical control system is finally reduced, so that the precision and the surface quality of a product are influenced. Description figure 7 shows a velocity time curve of an X axis in a uniform velocity stage after optimization by the error constraint-based trajectory optimization method provided by the present disclosure, wherein a horizontal axis represents time and a vertical axis represents velocity. Because the corner between adjacent straight lines is eliminated by the track after spline fitting, the smoothness of the track is effectively improved, so that the figure 7 in the specification can see that although the overall shape of the track is the same as that of a speed curve adopting straight line interpolation, the speed curve after fitting is smoother and jagged and disappears, the sudden change of the speed and the acceleration of an X axis is eliminated to the maximum extent, the quality of a product is improved, and a machine tool is more stable; meanwhile, the fitted track is smoother than the original track, the maximum feeding speed can be higher, and the processing efficiency of the small micro straight line segment is greatly improved.
Example 2:
referring to the specification and fig. 8, there is shown an error constraint-based trajectory optimization system provided by an embodiment of the present application, for performing any one of the foregoing error constraint-based trajectory optimization methods, including,
a dead pixel removing module 41, configured to remove a dead pixel in the NC program, combine the original straight line segments from which the dead pixel is removed, and output the combined straight line segment;
the data selection module 42 is configured to screen the straight line segments output by the dead pixel removal module 41, and select spline fitting boundary points; and
and the spline fitting module 43 is used for fitting and splicing the straight line segments with the spline fitting dividing points selected to obtain an optimized processing track.
The method has the advantages that a large number of tiny linear segments are fitted into a spline curve within a given error constraint range, the calculation efficiency is high, the programming algorithm is simple, the method is convenient to apply and popularize, the smoothness and the smoothness of a machining track can be improved, the machining efficiency and the machining quality of products are further high, and meanwhile, the movement of a machine tool can be more stable.
In the system provided in the foregoing embodiment, when the functions of the system are implemented, only the division of the functional modules is illustrated, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the system and method embodiments provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
Example 3:
referring to the specification fig. 9, there is provided an apparatus for trajectory optimization based on error constraints, the apparatus comprising:
one or more processors 51 and a memory 52, one processor 51 being exemplified in fig. 9.
The apparatus for trajectory optimization based on error constraints may further include: an input device 53 and an output device 54.
The memory 52, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the error constraint-based trajectory optimization method in the embodiments of the present application. The processor 51 executes various functional applications of the server and data processing, namely, implementing the error constraint-based trajectory optimization method of the above-described method embodiment, by running non-volatile software programs, instructions and modules stored in the memory 52.
The memory 52 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created from use of the trajectory optimization system based on error constraints, and the like. Further, the memory 52 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the memory 52 optionally includes memory remotely located from the processor 51, and these remote memories may be networked to the error constraint-based trajectory optimization system. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 53 may receive input numeric or character information and generate signal inputs relating to user settings and function control. The output device 54 may include a display device such as a display screen.
One or more modules are located throughout the memory 52 and, when executed by the one or more processors 51, perform the error constraint based trajectory optimization method of any of the method embodiments described above.
The device can execute the method provided by the embodiment of the application, and has the corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the methods provided in the embodiments of the present application.
Example 4:
in another aspect, the present disclosure embodiment 4 provides a computer-readable storage medium, in which one or more programs including execution instructions are stored, and the execution instructions can be read and executed by a device (including but not limited to a computer, a server, or a network device, etc.) to perform the relevant steps in the above method embodiments.
The above-described embodiments are merely illustrative, and units or modules described as separate parts may or may not be physically separate, and parts shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may essentially or additionally contribute to the prior art in the form of a software product, which may be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods of the various embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solutions of the present disclosure, not to limit them; although the present disclosure has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the present disclosure and its various embodiments.

Claims (8)

1. The track optimization method based on the error constraint is characterized by comprising the following steps of:
s1: removing dead pixels in the NC program, combining the original straight-line segments after the dead pixels are removed, and outputting combined straight-line segments;
s2: screening the straight line segments output in the step S1, and selecting spline fitting boundary points;
s3: fitting and splicing the straight line segments with the spline fitting boundary points to obtain an optimized processing track;
in the step S1, the dead pixels in the NC program are removed, the original straight-line segments with the dead pixels removed are merged, the merged straight-line segments are output,
s101: acquiring an ith original straight-line segment in an NC program, and solving the length l (i) of the original straight-line segment, wherein i =1,2,3 …;
s102: solving the maximum merging error after the 1 st original straight line segment is merged with the ith original straight line segment;
s103: judging whether the maximum merging error is smaller than a preset maximum merging error threshold value or not, if the maximum merging error is not smaller than the preset maximum merging error threshold value, executing S104, and if the maximum merging error is smaller than the preset maximum merging error threshold value, executing S105;
s104: merging the 1 st original straight line segment to the (i-1) th original straight line segment, and executing S108;
s105: calculating the total length L = sigma L (i) of straight-line segments from the 1 st original straight-line segment to the ith original straight-line segment;
s106: judging whether the total length L of the straight line segment is larger than a preset total length threshold of the straight line segment or not, if so, executing S107, and if not, returning to executing S101, wherein i = i +1;
s107: merging the 1 st straight line segment to the ith straight line segment, and executing S108;
s108: outputting the combined straight line segment;
in step S2, the straight line segments output in the step S1 are screened, spline fitting demarcation points are selected,
s201: acquiring a straight line segment, wherein the straight line segment is output in the step S1, and calculating the length l' of the straight line segment to execute S202;
s202: judging whether the length l' of the straight-line segment is greater than a preset length threshold value or not, if so, executing S207, and if not, executing S203;
s203: judging whether other straight line segments exist in the first cache, if no straight line segment exists in the first cache, executing the step S204, and if the straight line segment exists in the first cache, executing the step S205;
s204: storing the current straight line segment into a first cache, and returning to execute the step S201;
s205: calculating the included angle a between the current straight line segment and the straight line segment in the first cache,
s206: judging whether the included angle a is smaller than a preset included angle threshold value, if the included angle a is not smaller than the preset included angle threshold value, executing the step S207, and if the included angle a is smaller than the preset included angle threshold value, executing the step S209;
s207: selecting a connection point in the current straight-line segment as a spline fitting boundary point, and executing S208, wherein the connection point is the starting point of the current straight-line segment;
s208: outputting the straight line segment in the first cache, and executing step S209;
s209: the current straight line segment is updated to the first cache.
2. The error constraint-based trajectory optimization method of claim 1, wherein in step S3, the fitting and splicing of the straight line segments with the spline fitting boundary points selected are performed to obtain the optimized processing trajectory,
s301: acquiring the straight line segment output in the step S2;
s302: judging whether the terminal point of the current straight-line segment is a spline fitting boundary point, if so, executing S303, and if not, executing S304;
s303: adding the current straight line segment into a second cache, taking the endpoint of the straight line segment in the second cache as fitting data for fitting, and executing S307;
s304: adding the current straight line segment into a second cache, and executing S305;
s305: judging whether the total endpoint number of the straight-line segments in the second cache is equal to twice of the primary fitting control point number n, if so, executing a step S306, and if not, returning to execute the step S301;
s306: fitting the first n straight line segment endpoints in the second cache as fitting data to generate a fitting result and executing S307;
s307: judging whether the initial point in the fitting result is a spline fitting boundary point, if not, executing S308; if the starting point in the fitting result is a spline fitting boundary point, executing step S309;
s308: adding a cached intersection point at the head of the fitting result, and executing S309;
s309: the starting point is a control point, and step S310 is executed;
s310: judging whether the end point in the fitting result is a spline fitting boundary point, if so, executing step S311, and if not, executing step S312;
s311: the end point takes a double control point and executes S312;
s312: acquiring the number N of actual fitting control points calculated by the fitting, and executing the step S313;
s313: initializing a NURBS node vector by using an accumulated chord length method;
s314: taking the end points of the straight-line segments as control points, and taking the weight of each control point as 1 to obtain the integral fitting NURBS spline curve;
s315: calculating the deviation Error [ j ] between each node vector position and a straight line section in the fitting NURBS spline curve, wherein j =1,2,3 … and N-2,N-1;
s316: judging whether Error [ j ] is larger than a preset maximum deviation value or not, if so, executing S317, and if not, executing S318;
s317: adding a control point to the middle point of the longer straight line segment in the two adjacent straight line segments at the point j, and executing S313;
s318: judging whether the end point of fitting the NURBS spline curve is a spline fitting boundary point or not, if so, executing S319, otherwise, executing S320;
s319: outputting a fitted NURBS spline curve;
s320: and (5) caching and fitting the first 9 control points of the NURBS spline curve as the cross points, and outputting the tracks between the first cross points and the last cross points.
3. An error constraint-based trajectory optimization system for performing the error constraint-based trajectory optimization method of any one of claims 1-2, comprising,
the dead pixel removing module is used for removing dead pixels in the NC program, combining the original straight line segments after the dead pixels are removed and outputting combined straight line segments;
the data selection module is used for screening the straight line segments output by the dead pixel removal module and selecting spline fitting boundary points; and
and the spline fitting module is used for fitting and splicing the straight line sections with the spline fitting boundary points selected to obtain the optimized processing track.
4. The error constraint-based trajectory optimization system of claim 3, wherein the dead pixel removal module removes dead pixels from the NC program and combines the original straight line segments after dead pixel removal, and outputting the combined straight line segments comprises,
s101: acquiring an ith original straight-line segment in an NC program, and solving the length l (i) of the original straight-line segment, wherein i =1,2,3 …;
s102: solving the maximum merging error after the 1 st original straight line segment is merged with the ith original straight line segment;
s103: judging whether the maximum merging error is smaller than a preset maximum merging error threshold value or not, if the maximum merging error is not smaller than the preset maximum merging error threshold value, executing S104, and if the maximum merging error is smaller than the preset maximum merging error threshold value, executing S105;
s104: merging the 1 st original straight line segment to the (i-1) th original straight line segment, and executing S108;
s105: calculating the total length L = sigma L (i) of straight-line segments from the 1 st original straight-line segment to the ith original straight-line segment;
s106: judging whether the total length L of the straight line segment is larger than a preset total length threshold of the straight line segment or not, if so, executing S107, and if not, returning to the step S101, wherein i = i +1;
s107: merging the 1 st straight line segment to the ith straight line segment, and executing S108;
s108: and outputting the combined straight line segment.
5. The error constraint-based trajectory optimization system of claim 3, wherein the data selection module screens straight-line segments output by the dead pixel removal module and selects spline fitting boundary points comprising,
s201: acquiring a straight line segment, wherein the straight line segment is output by the dead pixel removal module, and calculating the length l' of the straight line segment to execute S202;
s202: judging whether the length l' of the straight line segment is greater than a preset length threshold value or not, if so, executing S207, and if not, executing S203;
s203: judging whether other straight line segments exist in the first cache, if no straight line segment exists in the first cache, executing the step S204, and if the straight line segment exists in the first cache, executing the step S205;
s204: storing the current straight line segment into a first cache, and returning to execute the step S201;
s205: calculating the included angle a between the current straight line segment and the straight line segment in the first cache,
s206: judging whether the included angle a is smaller than a preset included angle threshold value, if the included angle a is not smaller than the preset included angle threshold value, executing the step S207, and if the included angle a is smaller than the preset included angle threshold value, executing the step S209;
s207: selecting a connection point in the current straight-line segment as a spline fitting boundary point, and executing S208, wherein the connection point is the starting point of the current straight-line segment;
s208: outputting the straight line segment in the first cache, and executing the step S209;
s209: the current straight-line segment is updated into the first cache.
6. The error constraint-based trajectory optimization system of claim 3, wherein the spline fitting module fits and splices the straight line segments with the selected spline fitting demarcation points to obtain the optimized processing trajectory comprises,
s301: acquiring a straight line segment output by a data selection module;
s302: judging whether the terminal point of the current straight-line segment is a spline fitting boundary point, if so, executing S303, and if not, executing S304;
s303: adding the current straight line segment into a second cache, taking the endpoint of the straight line segment in the second cache as fitting data for fitting, and executing S307;
s304: adding the current straight line segment into a second cache, and executing S305;
s305: judging whether the total endpoint number of the straight-line segments in the second cache is equal to twice of the primary fitting control point number n, if so, executing a step S306, and if not, returning to execute the step S301;
s306: fitting the first n straight line segment end points in the second cache as fitting data to generate a fitting result and executing S307;
s307: judging whether the initial point in the fitting result is a spline fitting boundary point, if not, executing S308; if the starting point in the fitting result is a spline fitting boundary point, executing step S309;
s308: adding a cached intersection point at the head of the fitting result, and executing S309;
s309: the starting point is a control point, and step S310 is executed;
s310: judging whether the end point in the fitting result is a spline fitting boundary point, if so, executing step S311, and if not, executing step S312;
s311: the end point takes a double control point and executes S312;
s312: acquiring the number N of actual fitting control points calculated by the fitting, and executing the step S313;
s313: initializing a NURBS node vector by using an accumulated chord length method;
s314: taking the end points of the straight-line segments as control points, and taking the weight of each control point as 1 to obtain the integral fitting NURBS spline curve;
s315: calculating the deviation Error [ j ] between each node vector position and a straight line section in the fitting NURBS spline curve, wherein j =1,2,3 … and N-2,N-1;
s316: judging whether Error [ j ] is larger than a preset maximum deviation value or not, if so, executing S317, and if not, executing S318;
s317: adding a control point to the middle point of the longer straight line segment in the two adjacent straight line segments at the point j, and executing S313;
s318: judging whether the end point of fitting the NURBS spline curve is a spline fitting boundary point or not, if so, executing S319, otherwise, executing S320;
s319: outputting a fitted NURBS spline curve;
s320: and (4) caching and fitting 9 control points at the head of the NURBS spline curve as intersections, and outputting the tracks between the first intersections and the last intersections.
7. An apparatus for error constraint based trajectory optimization, comprising a processor and a memory, wherein the memory has stored therein at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by the processor to implement the method for error constraint based trajectory optimization according to any one of claims 1-2.
8. A computer-readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement the method for trajectory optimization based on error constraints of any of claims 1-2.
CN202111141704.7A 2021-09-29 2021-09-29 Error constraint-based trajectory optimization method and system Active CN113759824B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111141704.7A CN113759824B (en) 2021-09-29 2021-09-29 Error constraint-based trajectory optimization method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111141704.7A CN113759824B (en) 2021-09-29 2021-09-29 Error constraint-based trajectory optimization method and system

Publications (2)

Publication Number Publication Date
CN113759824A CN113759824A (en) 2021-12-07
CN113759824B true CN113759824B (en) 2023-03-14

Family

ID=78798017

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111141704.7A Active CN113759824B (en) 2021-09-29 2021-09-29 Error constraint-based trajectory optimization method and system

Country Status (1)

Country Link
CN (1) CN113759824B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106271281A (en) * 2016-09-27 2017-01-04 华南理工大学 A kind of complicated abnormal shape workpiece automatic welding system of path generator and method
CN112492523A (en) * 2020-11-05 2021-03-12 南京大学 Track constraint method based on ultra wide band real-time positioning
CN113393519A (en) * 2020-03-12 2021-09-14 武汉四维图新科技有限公司 Laser point cloud data processing method, device and equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8195393B2 (en) * 2009-06-30 2012-06-05 Apple Inc. Analyzing and consolidating track file data
US20130208009A1 (en) * 2010-10-01 2013-08-15 Saab Ab Method and apparatus for optimization and incremental improvement of a fundamental matrix
CN112597612B (en) * 2020-12-30 2023-12-15 深圳市优必选科技股份有限公司 Robot optimization method, device, terminal equipment and computer readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106271281A (en) * 2016-09-27 2017-01-04 华南理工大学 A kind of complicated abnormal shape workpiece automatic welding system of path generator and method
CN113393519A (en) * 2020-03-12 2021-09-14 武汉四维图新科技有限公司 Laser point cloud data processing method, device and equipment
CN112492523A (en) * 2020-11-05 2021-03-12 南京大学 Track constraint method based on ultra wide band real-time positioning

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《叶片双面磨抛系统及路径规划研究》;李大奇;《中国博士学位论文全文数据库 (工程科技Ⅰ辑)》;20110930;全文 *

Also Published As

Publication number Publication date
CN113759824A (en) 2021-12-07

Similar Documents

Publication Publication Date Title
CN111390902B (en) Trajectory planning method, trajectory planning device, apparatus, and storage medium
CN102809944B (en) Numerical controller with function to correct movement path of machining program
JP4464657B2 (en) Curved image processing apparatus and curved image processing method
CN109643102B (en) Instruction value generating device
CN113359607B (en) Track determination method applied to corner transition of five-axis numerical control machine
CN112129296A (en) Robot trajectory planning method and system
CN113759824B (en) Error constraint-based trajectory optimization method and system
CN109684739B (en) BIM model-based steel bar parameter generation method, device and equipment
EP3776111A1 (en) System and method for generating optimal lattice tool paths
CN108333937B (en) Contour machining method for multi-axis linkage machine tool
CN116149260B (en) Method and system for smooth transition between arcs in 3C metal processing
CN114488941A (en) Trace fairing method and medium for micro line segments and machine tool numerical control equipment
CN111323036B (en) Method and system for intelligently optimizing path of stock yard, electronic equipment and storage medium
CN112305994A (en) Straight line segment smoothing method, device and equipment based on average filtering and storage medium
CN101477583A (en) Computer-aided design method for cam curve of three-component zooming system
CN108765527B (en) Animation display method, animation display device, electronic equipment and storage medium
JP6000496B1 (en) Numerical controller
JP6219866B2 (en) Numerical control device with display function and display program
CN115205457A (en) Trajectory smoothing method, numerically controlled machine tool, and computer-readable storage medium
CN116922398B (en) Rope robot and path planning method and device thereof
CN111455380B (en) Real-time equal-lap-joint-rate laser cladding method and system
CN117557585B (en) Land parcel segmentation method, system, electronic equipment and storage medium
CN110837666B (en) Three-dimensional reconstruction method, system and medium for two-dimensional drawing of pitched roof
JP2925397B2 (en) Shape data creation method
CN117104844A (en) Automatic discharging method and device for trays, computer readable medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant