Feeding speed smooth planning method and device, electronic equipment and storage medium
By using the geometric features of the included angle based on discrete points and interpolation methods for speed planning, the problem of unstable feed speed in the machining of complex curved surfaces is solved, and efficient and smooth feed speed generation is achieved, which improves the real-time performance and machining quality of the CNC system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TSINGHUA UNIVERSITY
- Filing Date
- 2023-10-26
- Publication Date
- 2026-06-23
AI Technical Summary
Existing CNC systems suffer from unstable feed rates due to curvature fluctuations in the machining of complex curved surfaces, which affects machining accuracy and efficiency. Furthermore, the high complexity of curvature calculation makes it difficult to meet real-time requirements.
Speed planning is performed using the geometric features of the included angles of discrete points. Speed smoothing is achieved through interpolation. Combined with the normal and tangential constraints of the CNC system, the transition speed of discrete points is calculated and interpolated to generate a smooth feed speed curve.
It significantly reduces feed rate fluctuations, improves machining surface quality and efficiency, reduces computational complexity, and is compatible with various motion control systems.
Smart Images

Figure CN117348533B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of CNC machining technology, specifically to a method, apparatus, electronic device, and storage medium for smoothing feed rate planning. Background Technology
[0002] For machining complex curved surfaces, due to the discontinuity of the trajectory form of continuous micro-segments, current mainstream CNC systems generally use smoothing algorithms to obtain continuous curve trajectories, or directly output parametric curve trajectories through CAM (Computer-Aided Manufacturing). Subsequently, the motion control module in the CNC system generates an achievable speed curve through feed rate planning, and uses this to discretize the continuous toolpath at fixed time intervals (interpolation cycles). Finally, the interpolation points are sent to the servo control system to complete the CNC machining. The feed rate planning method has a significant impact on the final machining effect. On the one hand, feed rate planning must be based on trajectory characteristics; excessively high feed rates will affect machining accuracy, while excessively low feed rates will lead to low machining efficiency. On the other hand, it must avoid speed fluctuations and abrupt changes, otherwise, problems such as surface tool marks and machine tool vibration will occur during actual machining.
[0003] To address the aforementioned issues, current velocity planning primarily relies on the curvature characteristics of curved trajectories. Specifically, a smooth curved trajectory is first constructed based on the curvature characteristics of the curve, and geometric or dynamic constraints are then established to obtain the velocity limitation curve (VLC). Subsequently, the feed rate curve is obtained within the feasible region of the VLC through acceleration / deceleration methods or time-optimal velocity planning. However, while the curvature of a smooth curve is continuously changing, in practical applications, the curvature often fluctuates for complex machining trajectories, further contributing to feed rate fluctuations. Addressing curvature fluctuations requires corresponding smoothing algorithms; however, curvature calculation involves multi-order derivative calculations of the curve and requires operations on a large number of points on the curve, resulting in high computational complexity and posing a challenge to the real-time performance of the motion control module. Summary of the Invention
[0004] This disclosure aims to at least partially address one of the technical problems in the related art.
[0005] To address this, the present disclosure provides a feed rate smoothing planning method, apparatus, electronic device, and storage medium that performs rate planning based on the geometric features of the included angle of discrete points to solve the problem of curvature calculation complexity, and performs rate smoothing through interpolation to solve the problem of feed rate fluctuation. This can improve the surface quality and processing efficiency of the machined parts, and has high compatibility with CNC systems.
[0006] To achieve the above-mentioned objectives, this disclosure adopts the following technical solution:
[0007] The first aspect of this disclosure provides a method for smoothing feed rate planning, comprising:
[0008] Obtain the curve processing trajectory, sample the curve processing trajectory, and obtain the corresponding discrete point trajectory;
[0009] Based on the maximum normal acceleration and contour error set by the CNC system, the extreme values of the transition speed at each discrete point are calculated as the initial transition speed of each discrete point. The discrete points are then scanned in both directions, and the initial transition speeds of each discrete point are corrected according to the kinematic tangential constraints of the CNC system to obtain the target transition speeds of each discrete point.
[0010] For any point on the curved processing trajectory, the planned speed is obtained by interpolation and smoothing using the target transfer speed constraint of its adjacent discrete points.
[0011] In some embodiments, when sampling the curve processing trajectory, it should be ensured that the straight line trajectory of the discrete points meets the bow height error requirement with the original curve processing trajectory.
[0012] In some embodiments, the sampling method for the curve processing trajectory includes equal arc length discretization, equal parameter discretization, and equal bow height error discretization.
[0013] In some embodiments, let discrete point Q j The extreme value of the switching speed at point v j The calculation formula is as follows:
[0014]
[0015] Among them, a n The maximum normal acceleration is set for the CNC system; ε is the contour error set for the CNC system; α is an introduced adjustment coefficient, the value of which is set based on a given critical angle and commanded feed rate. The critical angle is between 170 and 180 degrees. When the angle θ between adjacent trajectory segments... j When the angle is greater than the critical angle, the extreme value of the transition speed v j The commanded feed rate is determined when the angle θ between adjacent trajectory segments is... j When the angle is less than the critical angle, the extreme value of the transition speed v j The above formula is used to obtain the adjustment coefficient α, which is calculated according to the following formula:
[0016]
[0017] In the formula, V is the commanded feed rate, and θ t This is the critical included angle.
[0018] In some embodiments, the kinematic tangential constraint is set to bounded tangential acceleration or bounded tangential deviation.
[0019] In some embodiments, correcting the initial transition speed of each discrete point according to the kinematic tangential constraints of the CNC system includes:
[0020] First, in a forward sequence, determine whether the transfer speed of each discrete point satisfies the dynamic tangential constraint of the CNC system. If it does, the transfer speed of the discrete point is set as the initial transfer speed. If it does not, the transfer speed of the next discrete point needs to be corrected to satisfy the dynamic tangential constraint of the CNC system. Then, in a reverse sequence, determine whether the transfer speed of each discrete point satisfies the dynamic tangential constraint of the CNC system. If it does, the transfer speed of the discrete point remains unchanged. If it does not, the transfer speed of the previous discrete point needs to be corrected to satisfy the dynamic tangential constraint of the CNC system. The transfer speed of each discrete point obtained after the forward and reverse bidirectional scanning is taken as the target transfer speed of each discrete point.
[0021] In some embodiments, the step of obtaining the planned speed by interpolation smoothing using the target transition speed constraints of its adjacent discrete points for any point on the curved processing trajectory specifically includes:
[0022] For any point on the curve processing trajectory, first determine its segmented interval, that is, determine its two adjacent discrete points Q. j and Q j+1 And calculate the distance from that point to Q. j and Q j+1 Distance L j and L j+1 The velocity v at that point can be obtained by interpolation. I for:
[0023]
[0024] in, and These are discrete points Q j and Q j+1 The target transfer speed at the location;
[0025] The calculated velocity v I The speed limit v set by the CNC system max Compare the feed rate with the commanded feed rate V, and take the minimum value as the final planned feed rate v at that point, that is: v = min{v I ,v max ,V}.
[0026] A second aspect of this disclosure provides a feed rate smoothing planning device, comprising:
[0027] The first module is configured to acquire the curve processing trajectory, sample the curve processing trajectory, and obtain the corresponding discrete point trajectory;
[0028] The second module is configured to calculate the extreme value of the transition speed of each discrete point based on the maximum normal acceleration and contour error set by the CNC system, and use it as the initial transition speed of each discrete point. It then performs bidirectional scanning on each discrete point and corrects the initial transition speed of each discrete point according to the kinematic tangential constraints of the CNC system to obtain the target transition speed of each discrete point.
[0029] The third module is configured to use the target transfer speed constraint of its adjacent discrete points to interpolate and smooth the planned speed for any point on the curve processing trajectory.
[0030] A third aspect of this disclosure provides an electronic device comprising:
[0031] At least one processor, and a memory communicatively connected to said at least one processor;
[0032] The memory stores instructions executable by the at least one processor, the instructions being configured to perform the feed rate smoothing planning method according to any embodiment of the first aspect of this disclosure.
[0033] A fourth aspect of this disclosure provides a computer-readable storage medium storing computer instructions for causing the computer to perform a feed rate smoothing planning method according to any embodiment of the first aspect of this disclosure.
[0034] The beneficial effects of this disclosure are as follows:
[0035] (1) Smoothing feed rate. This disclosure can smooth the feed rate of the curved trajectory based on the interpolation filtering method, significantly reducing speed fluctuations, thereby avoiding machine tool vibration, surface tool marks and other problems in actual machining, and improving the surface quality of the machined surface.
[0036] (2) Improve processing efficiency. This disclosure makes engineering adjustments to the speed extremum function and avoids frequent acceleration and deceleration caused by speed fluctuations, thereby improving processing efficiency to a certain extent.
[0037] (3) Strong system compatibility. The overall algorithm flow of this disclosure is independent and complete, and can be used in conjunction with different trajectory smoothing, spline interpolation and other algorithms; at the same time, the calculation of this disclosure is simple and the computational complexity is not high, which can meet the real-time requirements and can be adapted to various motion control systems, such as CNC systems, industrial robot control systems or other motion control systems. Attached Figure Description
[0038] Figure 1 This is an overall flowchart of the feed rate smoothing planning method provided in the first aspect of this disclosure.
[0039] Figure 2 The velocity extremum function corresponding to step S2 of the feed rate smoothing planning method provided in this embodiment is the relationship between the velocity extremum of discrete points and the angle between adjacent trajectory segments.
[0040] Figure 3 In (a) and (b), the feed rate change curves are calculated using interpolation points collected during the actual operation of the CNC system, respectively, by the existing feed rate smoothing planning method and the feed rate smoothing planning method provided in the embodiments of this disclosure.
[0041] Figure 4 A schematic diagram of the structure of an electronic device provided in a third aspect embodiment of this disclosure. Detailed Implementation
[0042] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of this application.
[0043] Conversely, this application covers any alternatives, modifications, equivalent methods, and schemes made within the spirit and scope of this application as defined by the claims. Furthermore, to provide the public with a better understanding of this application, certain specific details are described in detail below. However, this application can be fully understood by those skilled in the art even without these detailed descriptions.
[0044] See Figure 1 The first aspect of this disclosure provides a method for smoothing feed rate planning, comprising the following steps:
[0045] Step S1: Obtain the curve processing trajectory, sample the curve processing trajectory, and obtain the corresponding discrete point sequence and discrete point trajectory;
[0046] Step S2: Based on the maximum normal acceleration and contour error set by the CNC system, calculate the extreme value of the transition speed of each discrete point as the initial transition speed of each discrete point. Perform bidirectional scanning on each discrete point in the discrete point sequence, and correct the initial transition speed of each discrete point according to the kinematic tangential constraints of the CNC system to obtain the target transition speed of each discrete point.
[0047] Step S3: For any point on the curve processing trajectory, the planned speed is obtained by interpolation smoothing using the target transfer speed constraint of its adjacent discrete points.
[0048] This application proposes a feed rate smoothing planning method based on discrete point trajectories. This method is implemented in the motion control module of a CNC system. Machining parameter curve information is used as input to the motion control module. Rate planning is performed based on the geometric features of the included angles of discrete points to address the complexity of curvature calculation. Furthermore, speed smoothing is achieved through interpolation to resolve feed rate fluctuations. First, discrete point trajectories are obtained by sampling the curved machining trajectory, and normal and tangential constraints on the speed are calculated. The normal constraint is based on a circular arc transition model, proposing an improved transition speed function form. The transition speed of each discrete point is constrained by the normal acceleration and contour error of the CNC system. The tangential constraint is based on bidirectional scanning between discrete points, constrained by the tangential acceleration of the CNC system to constrain the tangential achievable speed of each discrete point. Finally, for any point on the curved trajectory, the planned speed is obtained by interpolation smoothing using the speed constraint values of adjacent discrete points, and the interpolation point is output in real time.
[0049] In some embodiments, in step S1, the motion control module of the CNC system is used to input the machining parameter curve information and construct the parameter curve as the machining trajectory for subsequent calculation of trajectory points on the curve. Taking the B-spline curve, which is commonly used in CNC systems, as an example, let the obtained machining trajectory be C(u), and its curve form is as follows:
[0050]
[0051] Where u is the formal parameter of the curve processing trajectory, u∈[0,1]; N i,p (u) is the i-th p-th B-spline basis function; P i Let P0 and P1 be the control points corresponding to the i-th p-th B-spline basis function, and there are a total of n+1 control points. Let P0 and P1 be the first and last points of the curve processing trajectory, respectively. n .
[0052] Subsequently, the acquired curve machining trajectory is sampled to obtain the corresponding discrete point trajectory, which is a continuous micro-segment composed of discrete points connected sequentially. When sampling the curve machining trajectory, it should be ensured that the straight-line trajectory of the discrete points meets the bow height error requirement compared to the original curve machining trajectory.
[0053] In one embodiment of this application, the curve machining trajectory is sampled based on the maximum interpolation step size determined by the command feed rate and the interpolation period of the motion control module to obtain the corresponding discrete point trajectory. Specifically: first, the maximum interpolation step size S is obtained based on the command feed rate V and the interpolation period T of the motion control module, where S = VT. Then, m maximum interpolation step sizes are used as the discrete period. Discretize the curved machining trajectory using equal arc lengths to obtain the discrete point trajectory {Q} of the curved machining trajectory. j},j=0,1,…,q,Qj Let m be the j-th discrete point. The curve machining trajectory is divided into q segments by the sequence of discrete points. The value of m should be selected according to the actual engineering application, and should ensure that the straight line trajectory of the discrete points and the curve machining trajectory meet the height error requirements.
[0054] In some other embodiments of this disclosure, the sampling method for the curve processing trajectory can be selected from methods such as equal-parameter discretization and equal-bow height error discretization, as long as the bow height error requirement is met.
[0055] In some embodiments, step S2 is used to set the normal and tangential constraints on the velocities (specifically, the transition velocities) of each discrete point obtained in step S1. Specifically, it includes the following steps:
[0056] Step S21: For the normal constraint of the velocity at each discrete point, firstly, the discrete point trajectory {Q} obtained in step S1 is used... j} Calculate the angle between adjacent trajectory segments, and let the discrete point Q be... j The angle between adjacent trajectory segments is θ. j Then, by introducing an adjustment coefficient α into the existing circular arc transition model, an improved circular arc transition model is obtained, and based on this improved circular arc transition model, the discrete point Q is obtained. j Extreme value of transition speed v at the point j This is used as the initial transfer speed at discrete points, v j The calculation formula is as follows:
[0057]
[0058] Among them, a n The maximum normal acceleration is set for the CNC system, and ε is the contour error set for the CNC system; both are known values. α is an introduced adjustment coefficient, the value of which is based on a given critical angle θ. t The critical angle θ is set by the commanded feed rate V. t According to actual engineering requirements, the value is generally taken between 170 and 180 degrees, when the included angle θ between adjacent trajectory segments... j Greater than the critical included angle θ t At that time, the extreme value of the switching speed v j The commanded feed rate V is obtained; when the angle θ between adjacent trajectory segments... j Less than the critical included angle θ t At that time, the extreme value of the switching speed v j The above formula is used to obtain the adjustment coefficient α, which is calculated according to the following formula:
[0059]
[0060] See Figure 2 , Figure 2The curve in the middle is an example of the aforementioned velocity extremum function, that is, the relationship between the velocity extremum at discrete points and the angle between adjacent trajectory segments from 0° to 180°. Figure 2 In the middle, the commanded feed rate V = 3500 mm / min, and the critical included angle θ t =175°.
[0061] Step S22: For the tangential constraint of the velocity at each discrete point, the extreme value of the transition velocity v at each discrete point is calculated according to step S21. j By scanning in both forward and reverse directions, the velocities of adjacent discrete points are made accessible. The accessibility condition depends on the dynamic constraints of the CNC system; in one embodiment of this application, the tangential acceleration is required to be bounded, let a... t This represents the maximum tangential acceleration.
[0062] First, perform a forward scan following these steps:
[0063] Following the order of j from 0 to q-1, the following judgments are made sequentially:
[0064]
[0065] If the above equation is satisfied, then the transition speed v at the next discrete point is... j+1 If the extreme value of the transfer speed set in step S21 does not satisfy the above formula, then the transfer speed v at the next discrete point needs to be calculated according to the following formula. j+1 Make corrections:
[0066]
[0067] After the forward scan is complete, perform a reverse scan following these steps:
[0068] Following the order of j from q to 1, perform the following checks sequentially:
[0069]
[0070] If the above formula is satisfied, then the transfer speed v at the discrete point of the next scan will be... j-1 If the above equation is not satisfied, then the transition speed v at the discrete points of the next scan needs to be adjusted according to the following equation. j-1 Make corrections:
[0071]
[0072] The transfer speed at each discrete point obtained after completing both forward and reverse scanning is taken as the target transfer speed for each discrete point.
[0073] In some embodiments, step S3 specifically includes the following steps:
[0074] For any point on the curve machining trajectory, first determine its segmented interval, that is, determine its two adjacent discrete points Q. j and Q j+1 And calculate the distance from that point to Q. j and Q j+1 Distance L j and L j+1 The velocity v at that point can be obtained by interpolation. I for:
[0075]
[0076] The calculated velocity v I It should be further compared with the system's set speed limit v max Compare the feed rate with the commanded feed rate V, and take the minimum value as the final planned feed rate v at that point, that is:
[0077] v = min{v I ,v max ,V}
[0078] Therefore, by step S3, the feed rate planning value at any point on the curve machining trajectory can be obtained. Then, by using the parametric curve interpolation algorithm, the interpolation point can be obtained and output to the servo control system in real time.
[0079] See Figure 3 In this paper, (a) is the result obtained using the conventional speed planning method, and (b) is the result obtained using the speed planning method provided in the present disclosure embodiment. The comparison shows that the scheme of the present disclosure embodiment can significantly smooth the feed speed, and the feed speed basically maintains a uniform change.
[0080] The feed rate smoothing planning apparatus provided in the second aspect embodiment of this disclosure includes:
[0081] The first module is configured to acquire the curve processing trajectory, sample the curve processing trajectory, and obtain the corresponding discrete point sequence and discrete point trajectory.
[0082] The second module is configured to calculate the extreme value of the transition speed of each discrete point based on the maximum normal acceleration and contour error set by the CNC system, and use it as the initial transition speed of each discrete point. It then performs bidirectional scanning on each discrete point in the discrete point sequence and corrects the initial transition speed of each discrete point according to the kinematic tangential constraints of the CNC system to obtain the target transition speed of each discrete point.
[0083] The third module is configured to use the target transfer speed constraint of its adjacent discrete points to interpolate and smooth the planned speed for any point on the curve processing trajectory.
[0084] To implement the above embodiments, this disclosure also proposes a computer-readable storage medium storing a computer program thereon, which is executed by a processor to perform the feed rate smoothing planning method provided in the first aspect of this disclosure.
[0085] The following is for reference. Figure 4 The diagram illustrates a structural schematic suitable for implementing the electronic device provided in the third aspect of the present disclosure. The electronic device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs, desktop computers, and servers. Figure 4 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0086] like Figure 4 As shown, the electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 102 or a program loaded from a storage device 108 into a random access memory (RAM) 103. The RAM 103 also stores various programs and data required for the operation of the electronic device. The processing unit 101, ROM 102, and RAM 103 are interconnected via a bus 104. An input / output (I / O) interface 105 is also connected to the bus 104.
[0087] Typically, the following devices can be connected to I / O interface 105: input devices 106 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, etc.; output devices 107 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 108 including, for example, magnetic tapes, hard disks, etc.; and communication devices 109. Communication device 109 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 4 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.
[0088] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, this embodiment includes a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network via communication device 109, or installed from storage device 108, or installed from ROM 102. When the computer program is executed by processing device 101, it performs the functions defined above in the methods of embodiments of this disclosure.
[0089] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0090] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0091] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the feed rate smoothing planning method provided in the first aspect of the present disclosure.
[0092] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and Python, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0093] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0094] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0095] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the function involved, as will be understood by those skilled in the art to which embodiments of this application pertain.
[0096] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0097] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0098] Those skilled in the art will understand that implementing all or part of the steps of the methods in the above embodiments can be accomplished by instructing related hardware through a program. The developed program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0099] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0100] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.
Claims
1. A method for smoothing feed rate planning, characterized in that, include: Obtain the curve processing trajectory, sample the curve processing trajectory, and obtain the corresponding discrete point trajectory; Based on the maximum normal acceleration and contour error set by the CNC system, the extreme values of the transition speed at each discrete point are calculated as the initial transition speed of each discrete point. The discrete points are then scanned in both directions, and the initial transition speeds of each discrete point are corrected according to the kinematic tangential constraints of the CNC system to obtain the target transition speeds of each discrete point. For any point on the curved processing trajectory, the planned speed is obtained by interpolation and smoothing using the target transfer speed constraint of its adjacent discrete points. Let discrete points The extreme value of the switching speed at that point is The calculation formula is as follows: in, The maximum normal acceleration set for the CNC system. The contour error set for the CNC system; The introduced adjustment coefficient, The value is set based on a given critical angle and commanded feed rate. The critical angle is between 170 and 180 degrees. The angle between adjacent trajectory segments... Extreme value of transition speed when the angle is greater than the critical angle Take the commanded feed rate, when the angle between adjacent trajectory segments Extreme value of transition speed when the angle is less than the critical angle The adjustment coefficient is obtained from the above formula. Calculate according to the following formula: In the formula, For commanded feed rate, This is the critical included angle.
2. The feed rate smoothing planning method according to claim 1, characterized in that, When sampling the curve processing trajectory, it should be ensured that the straight line trajectory of the discrete points meets the bow height error requirement with the original curve processing trajectory.
3. The feed rate smoothing planning method according to claim 2, characterized in that, The sampling methods for the machining trajectory of the curve include equal arc length discretization, equal parameter discretization, and equal bow height error discretization.
4. The feed rate smoothing planning method according to claim 1, characterized in that, The kinematic tangential constraint is set as either bounded tangential acceleration or bounded tangential deviation.
5. The feed rate smoothing planning method according to claim 1, characterized in that, The correction of the initial transition speed of each discrete point based on the kinematic tangential constraints of the CNC system includes: First, in a forward sequence, determine whether the transfer speed of each discrete point satisfies the dynamic tangential constraint of the CNC system. If it does, the transfer speed of the discrete point is set as the initial transfer speed. If it does not, the transfer speed of the next discrete point needs to be corrected to satisfy the dynamic tangential constraint of the CNC system. Then, in a reverse sequence, determine whether the transfer speed of each discrete point satisfies the dynamic tangential constraint of the CNC system. If it does, the transfer speed of the discrete point remains unchanged. If it does not, the transfer speed of the previous discrete point needs to be corrected to satisfy the dynamic tangential constraint of the CNC system. The transfer speed of each discrete point obtained after the forward and reverse bidirectional scanning is taken as the target transfer speed of each discrete point.
6. The feed rate smoothing planning method according to claim 1, characterized in that, The method of obtaining the planned speed by interpolation smoothing using the target transition speed constraints of its adjacent discrete points for any point on the curved processing trajectory specifically includes: For any point on the curve processing trajectory, first determine its segmented interval, that is, determine its two adjacent discrete points. and And calculate the distance from that point to each point. and distance and The velocity at that point can be obtained by interpolation. for: in, and Discrete points and The target transfer speed at the location; The calculated speed Speed limit set by the CNC system and command feed rate Compare the values and take the minimum value as the final planned speed for that point. ,Right now: .
7. A feed rate smoothing planning device, characterized in that, include: The first module is configured to acquire the curve processing trajectory, sample the curve processing trajectory, and obtain the corresponding discrete point trajectory; The second module is configured to calculate the extreme value of the transition speed of each discrete point based on the maximum normal acceleration and contour error set by the CNC system, and use it as the initial transition speed of each discrete point. It then performs bidirectional scanning on each discrete point and corrects the initial transition speed of each discrete point according to the kinematic tangential constraints of the CNC system to obtain the target transition speed of each discrete point. The third module is configured to use the target transfer speed constraint of its adjacent discrete points to interpolate and smooth the planned speed for any point on the curve processing trajectory. Let discrete points The extreme value of the switching speed at that point is The calculation formula is as follows: in, The maximum normal acceleration set for the CNC system. The contour error set for the CNC system; The introduced adjustment coefficient, The value is set based on a given critical angle and commanded feed rate. The critical angle is between 170 and 180 degrees. The angle between adjacent trajectory segments... Extreme value of transition speed when the angle is greater than the critical angle Take the commanded feed rate, when the angle between adjacent trajectory segments Extreme value of transition speed when the angle is less than the critical angle The adjustment coefficient is obtained from the above formula. Calculate according to the following formula: In the formula, For commanded feed rate, This is the critical included angle.
8. An electronic device, characterized in that, include: At least one processor, and a memory communicatively connected to said at least one processor; The memory stores instructions that can be executed by the at least one processor, the instructions being configured to perform the feed rate smoothing planning method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the feed rate smoothing planning method according to any one of claims 1 to 6.