Speed planning methods, interpolation point determination methods, devices and related equipment
By acquiring multiple CNC program segments and determining track segments in the CNC system, and optimizing speed planning based on corner error and acceleration constraints, the problem of frequent acceleration and deceleration in the processing of complex surfaces or curved workpieces is solved, and the processing quality and efficiency are improved.
Patent Information
- Application Number
- CN202410998494.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-07-24
AI Technical Summary
When existing CNC systems process complex curved surfaces or curved workpieces, frequent acceleration and deceleration lead to vibration of the machine tool, affecting the processing quality and efficiency.
By acquiring multiple CNC program segments, the track segment to be processed is determined, and the target connection speed is determined based on the corner error and acceleration constraints at the connection between the track segments, ensuring that the corner error does not exceed the maximum allowable value, and speed planning is optimized.
Improves processing quality and efficiency, reduces machine tool vibration, and ensures the finish and stability of the processing surface.
Smart Images

Figure CN118534842B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of numerical control, and specifically to a speed planning method, an interpolation point determination method, an apparatus, and related equipment. Background Art
[0002] Speed planning is one of the key indicators of a CNC system's performance. Proper speed planning allows the system to optimize speed control while maintaining machining accuracy, which is crucial for improving machining quality. In this context, improving speed planning methods and enhancing machining quality has become a pressing issue for those skilled in the art. Summary of the Invention
[0003] In view of this, embodiments of the present application provide a speed planning method, an interpolation point determination method, an apparatus, and related equipment, which can improve the processing quality of a CNC system.
[0004] To achieve the above objectives, the embodiments of the present application provide the following technical solutions.
[0005] In a first aspect, an embodiment of the present application provides a speed planning method, comprising:
[0006] Get multiple NC program segments;
[0007] Determining a plurality of trajectory segments to be processed based on the plurality of numerical control program segments;
[0008] Acquiring numerical control machining parameters, wherein the numerical control machining parameters include at least: an angle between the connection points of the track segments and a maximum allowable corner error of the connection points;
[0009] Determining a first connecting speed at the connection based on a corner error constraint at the connection, at least according to a maximum allowable corner error and an angle at the connection; wherein the corner error constraint at the connection at least indicates: a relationship between the maximum allowable corner error, the angle at the connection, and the first connecting speed, provided that the corner error at the connection does not exceed the maximum allowable corner error;
[0010] A target connecting speed of the connecting point is determined according to the first connecting speed of the connecting point.
[0011] Optionally, the determining the first connection speed at the connection based on the corner error constraint condition at the connection according to at least a maximum allowable corner error and an angle at the connection includes:
[0012] When the corner error at the joint does not exceed the maximum allowable corner error, the first joint speed is determined according to the maximum allowable corner error at the joint, the angle of the joint, the position loop gain and the feedforward coefficient of the numerical control system.
[0013] Optionally, determining the first connection speed according to a maximum allowable corner error of the connection, an angle of the connection, a position loop gain and a feedforward coefficient of the numerical control system includes:
[0014] According to the formula , determining the first connection speed;
[0015] in, is the first connection speed, is the maximum allowable corner error, is the angle, is the position loop gain, is the feedforward coefficient.
[0016] Optionally, the maximum allowable corner error at the connection point is: the maximum composite error corresponding to the steady-state errors of the two trajectory segments connected at the connection point; wherein, when the steady-state errors of the two trajectory segments are equal, the composite error corresponding to the steady-state errors of the two trajectory segments is the maximum composite error.
[0017] Optionally, the CNC machining parameters further include: a maximum acceleration of the machine tool; and the method further includes:
[0018] Based on the acceleration constraint condition of the joint, the second joint speed of the joint is determined according to at least the maximum acceleration of the machine tool and the angle of the joint; wherein the acceleration constraint condition of the joint at least indicates: when the speed direction of the joint changes, the relationship between the maximum acceleration, the angle of the joint and the second joint speed.
[0019] Optionally, in the case where the velocity direction at the junction changes, the product of the maximum acceleration and the interpolation period is not less than the change in the velocity vector at the junction;
[0020] Among them, the change in the velocity vector at the connection point is determined based on the endpoint velocity value of the previous trajectory segment connected to the connection point, the starting velocity value of the next trajectory segment, and the angle at the connection point; the endpoint velocity value of the previous trajectory segment is equal to the starting velocity value of the next trajectory segment.
[0021] Optionally, the determining the second connection speed of the connection based on the acceleration constraint condition of the connection at least according to the maximum acceleration of the machine tool and the angle of the connection includes:
[0022] A second connection speed at the connection is determined according to the maximum acceleration, the angle of the connection, and the interpolation period.
[0023] Optionally, determining the second connection speed at the connection point according to the maximum acceleration, the angle at the connection point, and the interpolation period includes:
[0024] According to the formula , determining the second connection speed;
[0025] in, is the second connection speed, is the maximum acceleration, is the angle, is the interpolation period.
[0026] Optionally, determining a target connection speed at the connection point according to the first connection speed at the connection point includes:
[0027] The minimum value of the first connection speed and the second connection speed at the connection point is taken as the target connection speed at the connection point.
[0028] Optionally, obtaining a plurality of numerical control program segments includes:
[0029] Based on the maximum number of trajectory segments for speed planning, a corresponding plurality of NC program segments are obtained;
[0030] Determining a plurality of trajectory segments to be processed based on the plurality of numerical control program segments includes:
[0031] Based on the multiple numerical control program segments, the trajectory segments are classified into straight line segments, arc segments and line segments to be fitted according to the types of the trajectory segments, and the line segments to be fitted are fitted into continuous curves.
[0032] Optionally, the connection point is: a connection point between straight line segments.
[0033] In a second aspect, an embodiment of the present application further provides a method for determining an interpolation point, including:
[0034] Obtaining a target connection speed at a connection point between the trajectory segments to be processed, wherein the target connection speed at the connection point is determined based on the speed planning method described above;
[0035] The interpolation points in the NC machining process are determined according to the target connection speed at the connection between the trajectory segments to be processed.
[0036] In a third aspect, an embodiment of the present application further provides a speed planning device, comprising:
[0037] a trajectory segment determination module, configured to obtain a plurality of numerical control program segments and determine a plurality of trajectory segments to be processed based on the plurality of numerical control program segments;
[0038] A parameter acquisition module is used to acquire numerical control machining parameters, wherein the numerical control machining parameters include at least: the angle between the connection points of the track segments and the maximum allowable corner error of the connection points;
[0039] a first connecting speed determining module configured to determine a first connecting speed at the connection based on a corner error constraint condition at the connection, at least according to a maximum allowable corner error and an angle at the connection; wherein the corner error constraint condition at the connection at least indicates: a relationship between the maximum allowable corner error, the angle at the connection, and the first connecting speed, provided that the corner error at the connection does not exceed the maximum allowable corner error;
[0040] The target connecting speed determining module is used to determine a target connecting speed at the connecting point according to the first connecting speed at the connecting point.
[0041] In a fourth aspect, an embodiment of the present application also provides a numerical control device, comprising at least one processor and at least one memory, wherein the memory stores one or more computer-executable instructions, and the processor calls the one or more computer-executable instructions to execute the speed planning method and interpolation point determination method as described above.
[0042] In a fifth aspect, an embodiment of the present application further provides a numerical control system, comprising at least the numerical control device as described above.
[0043] In a sixth aspect, an embodiment of the present application further provides a storage medium, which stores one or more computer-executable instructions. When the one or more computer-executable instructions are executed, the above-mentioned speed planning method and interpolation point determination method are implemented.
[0044] In a seventh aspect, an embodiment of the present application further provides a computer program product, which, when executed by a processor, implements the steps of the speed planning method as described above and the steps of the interpolation point determination method as described above.
[0045] The speed planning method provided by the embodiment of the present application can determine multiple trajectory segments to be processed based on multiple acquired CNC program segments before path processing, so that the target connection speed at the connection between the trajectory segments is the speed that needs to be planned by the embodiment of the present application, that is, the embodiment of the present application can perform forward planning of the speed at the connection; when planning the target connection speed at the connection, the embodiment of the present application can be based at least on the corner error constraint condition of the connection, wherein the corner error constraint condition of the connection indicates: when the corner error at the connection does not exceed the maximum allowable corner error, the relationship between the maximum allowable corner error, the angle degree of the connection, and the first connection speed; further, the embodiment of the present application can obtain CNC processing parameters, and the CNC processing parameters at least include: the angle degree of the connection between the trajectory segments and the maximum allowable corner error at the connection; based on the acquired CNC processing parameters and the defined corner error constraint condition of the connection, the embodiment of the present application can determine the first connection speed of the connection based on at least the maximum allowable corner error and the angle degree of the connection; further, based on the first connection speed of the connection, determine the target connection speed of the connection to achieve planning of the target connection speed of the connection.
[0046] It can be seen that the speed planning method provided in the embodiment of the present application can limit the connection speed by using the corner error constraint condition at the connection point, so as to ensure that the corner error generated when processing based on the connection speed during the actual processing does not exceed the maximum allowable corner error, thereby improving the smoothness of the processed surface. Therefore, the speed planning method provided in the embodiment of the present application can improve the processing quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.
[0048] Figure 1 This is a schematic structural diagram related to the forward-looking function of the numerical control system provided in an embodiment of the present application;
[0049] Figure 2 This is an optional flow chart of the speed planning method provided in the embodiment of the present application;
[0050] Figure 3 is a schematic diagram of a position loop control system provided in an embodiment of the present application;
[0051] Figure 4 is a schematic diagram of the corner error of the joint provided by the embodiment of the present application;
[0052] Figure 5 This is another optional flow chart of the speed planning method provided in the embodiment of the present application;
[0053] Figure 6 This is a schematic diagram of the change in velocity vector at the junction provided by an embodiment of the present application;
[0054] Figure 7 A schematic diagram of a speed planning device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0056] A CNC system, short for digital control system, is a specialized computer system equipped with interface circuits and servo drives that can perform some or all numerical control functions according to a control program stored in the computer's memory. These systems primarily control the motion of one or more mechanical devices (such as machine tools) using digital instructions composed of numbers, text, and symbols. They offer advantages such as high precision, repeatability, efficiency, and a high degree of automation. Through precise programming and control, they enable efficient machining of complex parts. Consequently, CNC systems are widely used in CNC machining.
[0057] The Look-Ahead technology of CNC systems plays a crucial role in the CNC process. This technology, also known as speed look-ahead control technology, means that before actually performing path processing, the CNC system pre-reads multiple sections of the Numerical Control (NC) program, analyzes the geometric characteristics and overall trend of the processing path, and determines the corresponding acceleration and deceleration areas.
[0058] To facilitate understanding of the Look-Ahead technology of the CNC system, the Look-Ahead technology in the CNC system is introduced below with reference to the accompanying drawings.
[0059] Figure 1 This is a schematic diagram of the structure of the forward-looking function of the numerical control system provided in the embodiment of the present application, with reference to Figure 1As shown, the NC program is input into the NC system in the form of G-code, a standardized programming language used to define the motion and operation of the machine tool. The decoder 11 receives the G-code and converts it into specific instructions that the machine tool can execute. The shared memory 12 is connected to the decoder and is used to store current processing data and machine tool status information. The Look-Ahead module 13 is a functional module in the NC system that implements Look-Ahead. It can access the above-mentioned processing data, machine tool status information, and instruction data sent to the shared memory by the decoder through the shared memory, and then predict and optimize future machine tool motion based on the data in the shared memory. The interpolator 14 receives the predicted data from the Look-Ahead module and is responsible for converting the predicted data into specific motion instructions for each axis of the machine tool. The controller 15 receives the motion instructions output by the interpolator and converts them into actual motor control signals to drive the XY stage 16 or other motion axes of the machine tool. The XY stage, as the motion execution part of the machine tool, can move precisely according to the instructions of the controller, allowing the workpiece or tool to move along the X-axis and Y-axis to achieve precise position control of the tool relative to the workpiece.
[0060] The Look-Ahead module may predict and optimize the future machine tool motion according to the data in the shared memory, and the steps may include: S1: selecting continuous small line segments that can be fitted; S2: curve fitting; S3: speed planning.
[0061] In actual machining, the trajectory segments to be processed can be divided into at least three categories: straight lines, circular arcs, and continuous, small, and fittable segments. Curves are smoother than multiple small segments. During CNC machining, smooth trajectory paths can reduce vibration and shock on the machine tool, thereby improving machining stability and efficiency. Therefore, continuous, small, and fittable segments can be fitted into curves for further machining. Accordingly, the interpolation instructions generated by the interpolator 14 can be categorized as linear interpolation, circular interpolation, and other curve interpolation.
[0062] Trajectory and velocity planning are key indicators of CNC system performance. This includes velocity planning and trajectory interpolation. Reasonable velocity planning allows the CNC system to optimize speed control while maintaining machining accuracy. Proper acceleration and deceleration planning can achieve superior machining quality. Therefore, improving velocity planning methods to enhance machining quality is a pressing issue in the CNC machining field.
[0063] One speed planning method involves performing speed planning within the G-code of a single NC program. This method is feasible for machining simple workpiece contours and can achieve good speed planning results. However, with the development of the mold industry, workpiece surface requirements are constantly increasing, requiring the machining of workpieces with complex surfaces or curves. These workpieces place high demands on both machining speed and quality. In actual machining, programs for such workpieces can be generated by post-processing programs within Computer-Aided Manufacturing (CAM) software. This post-processing program converts the generated tool path into a NC program (such as G-code) that can be understood by a specific machine tool or controller. The characteristic of these workpiece machining programs is that complex surfaces or curves are approximated to their true contours using multiple tiny line segments or arcs (smaller in size or length than the original surface or curve).
[0064] However, in a CNC system, one program segment corresponds to one or more trajectory segments, that is, each line of the program corresponds to a tiny line segment. Therefore, the length of the machining program for the workpiece with complex surfaces or curves may be long. The speed planning method mentioned above may lead to frequent acceleration, deceleration, and start-stop during the machining process, causing machine tool vibration, which may lead to the machining efficiency and surface machining quality failing to meet the requirements.
[0065] In view of this, an embodiment of the present application provides a speed planning method that can improve the processing quality of a CNC system. Figure 2 This is an optional flow chart of the speed planning method provided in the embodiment of the present application. The method can be applied to a numerical control system, for example, the method flow is executed by a numerical control device in the numerical control system. Figure 2 , the speed planning method may include the following steps.
[0066] Step S201: Acquire multiple NC program segments; and determine multiple trajectory segments to be processed based on the multiple NC program segments.
[0067] In a CNC system, a NC program consists of a series of program segments that define the motion trajectory and operations of a machine tool. The trajectory segment to be machined refers to the portion of the workpiece that needs to be machined. During machining, one NC program segment can correspond to one or more trajectory segments to be machined. By acquiring multiple NC program segments, multiple trajectory segments to be machined can be determined based on these multiple NC program segments.
[0068] In an optional implementation, the method for obtaining multiple numerical control program segments may include: obtaining corresponding multiple numerical control program segments based on a maximum number of trajectory segments for speed planning.
[0069] In the actual processing process, the current look-ahead segment number can be set and determined as the maximum trajectory segment number for current speed planning, thereby obtaining a corresponding plurality of numerical control program segments.
[0070] Furthermore, based on the multiple numerical control program segments, the trajectory segments can be classified into straight line segments, arc segments and line segments to be fitted according to the type of the trajectory segments, and the line segments to be fitted can be fitted into continuous curves.
[0071] In this embodiment, by classifying trajectory segments into different types, different speed planning methods can be used based on the segment type, thereby improving processing efficiency. Specifically, line segments to be fitted (e.g., multiple continuous, small curve segments) can be first fitted into a continuous curve before processing. This improves the smoothness of the processed trajectory segment, reduces vibration and shock generated by the machine tool during processing, and thus improves processing stability and efficiency.
[0072] Step S202: Acquire CNC machining parameters.
[0073] The numerical control machining parameters may include at least: an included angle between the track segments and a maximum allowable corner error at the connection; the included angle may be used to subsequently determine a connection speed at the connection.
[0074] It should be noted that the angle degree of the connection point can be determined based on the angle degree of the connection point between two trajectory segments to be processed each time.
[0075] When the CNC system executes instructions, due to the dynamic characteristics of the machine tool's transmission system, there is generally a following error, that is, the deviation between the actual motion trajectory and the command trajectory. Therefore, in the process of machining the connection between two trajectory segments, a corner error will be generated at the connection.
[0076] The maximum allowable corner error is the maximum allowable deviation between the corner actually machined at the joint during the execution of the NC program and the predetermined corner in the NC program. If the corner error is too large, it may cause uneven wear of the tool at the corner, affecting the finish and quality of the machined surface; in order to ensure the processing quality, it may be necessary to reduce the speed of the joint to allow more time for position adjustment and reduce the vibration caused by the corner error, but this may result in a reduction in processing efficiency. Therefore, in the embodiment of the present application, in order to meet the requirements of processing quality and processing efficiency at the same time, it is necessary to reasonably set the value of the maximum allowable corner error, so that the connection speed of the joint can be determined based on the constraint relationship between the maximum allowable corner error and the connection speed, so that processing can be performed based on the connection speed to improve processing quality.
[0077] It should be noted that the connection point in the embodiment of the present application can be the connection point between straight line segments. In other words, the speed planning method provided in the embodiment of the present application can be used for speed planning at the connection point between straight line segments. Of course, the embodiment of the present application can also be applied to speed planning at the connection point between other types of trajectory segments.
[0078] The following describes the corner error constraint conditions at the joint with reference to the accompanying drawings.
[0079] First, in CNC systems, single-axis control systems primarily utilize a three-loop control structure to achieve precise control of the servo motor. These loops include a current loop, a speed loop, and a position loop. These three loops work together to ensure the controller can control the servo motor to follow a predetermined trajectory. The position loop, as the outermost control loop, is responsible for calculating the required speed command based on a given position command, thereby controlling the servo motor to the specified position. The control accuracy of the position loop directly affects the machining accuracy of the entire CNC system.
[0080] Figure 3 : is a schematic diagram of a position loop control system provided in an embodiment of the present application, wherein X(s) represents the position command input to the control system, and Y(s) represents the output of the control system. is the position loop gain, is the feedforward coefficient, s represents the complex frequency variable in Laplace transform, which is used to describe the behavior of the control system in the frequency domain. In control systems, Laplace transform is a mathematical tool for analyzing and designing the dynamic characteristics of control systems. The product of and s represents the feedforward control term in the control system, which is used to indicate the strength of the feedforward control in the control system, that is, the control system's ability to respond to changes in position commands.
[0081] Specifically, the position command X(s) is input to the control system, and the control system calculates the difference between the input position command X(s) and the actual output position Y(s) fed back; the position loop gain Multiplying the difference, the error is amplified proportionally, so that the control system can respond to the error more quickly and try to eliminate the error; at the same time, the feedforward coefficient Based on the current input position command X(s), the system can predict and compensate for future position changes, quickly responding and adjusting the control signal in advance to reduce the aforementioned error. The control signal generated by the processed position command is then integrated (1 / s) to eliminate steady-state errors, generating the final control signal that is output to the servo motor to drive the machine tool. During this process, the encoder provides feedback on the actual position Y(s), forming a closed-loop control system.
[0082] Based on the process of the position loop control system described above, the transfer function G(s) of the control system can be:
[0083] .
[0084] The transfer function G(s) is used to represent the relationship between input and output in the control system.
[0085] In an optional implementation, for two connected trajectory segments, the steady-state errors of the two trajectory segments can be determined respectively; and the maximum composite error corresponding to the steady-state errors of the two trajectory segments is determined as the maximum allowable corner error at the connection of the two trajectory segments.
[0086] In an alternative embodiment, referring to Figure 4 , Figure 4 This is a schematic diagram of the corner error at the junction provided by the embodiment of the present application. In the figure, the straight line segment AB and the straight line segment BC are two connected trajectory segments, that is, the trajectory segments predetermined by the instruction; the dotted line portion represents the actual trajectory at the corner, so A is the starting point of the corner error, and C is the end point of the corner error. Among them, the steady-state error of the first straight line segment is For one side, the steady-state error of the second straight line segment is For the other side, the corner error is the steady-state error of the straight line segment and The synthetic error.
[0087] Furthermore, in an embodiment of the present application, when the steady-state errors of two trajectory segments are equal, the composite error corresponding to the steady-state errors of the two trajectory segments can be determined as the maximum composite error, and used as the maximum allowable corner error at the junction of the two trajectory segments.
[0088] In an alternative embodiment, referring to Figure 4 , when the steady-state error of the two straight line segments is and When the values of are equal, that is, both are ξ, the synthetic error is the largest; Figure 4 The perpendicular line passing through the actual trajectory corner intersection B and perpendicular to the line segment connecting the corner error starting point A and ending point C can be expressed as the maximum composite error, which can be used as the maximum allowable corner error at the connection of the trajectory segment. As can be seen from the figure, the value of the maximum allowable corner error is expressed as The maximum allowable corner error is:
[0089] (Formula 1);
[0090] in, It is the angle between the two track segments AB and BC.
[0091] In an optional implementation, for any trajectory segment, the steady-state error of the trajectory segment can be determined based on the speed of the segment before the endpoint of the trajectory segment, the position loop gain and the feedforward coefficient of the CNC system; among them, the steady-state error of the trajectory segment is positively correlated with the speed of the segment before the endpoint of the trajectory segment and negatively correlated with the position loop gain.
[0092] Since the speed of a single-axis system in a straight line segment can be defined as a step signal, according to the input and the above transfer function , perform inverse Laplace transform on the output in the time domain, assuming that the system has reached steady state at the end point (i.e., the time point when the output reaches its final steady-state value), the steady-state error ξ at the end point can be obtained as:
[0093] ξ = input - output = (Formula 2).
[0094] From formula 2, we can see that the steady-state error ξ of the trajectory segment is positively correlated with the speed F before the end point and is positively correlated with the position loop gain There is a negative correlation, among which is the feedforward coefficient.
[0095] Substituting Formula 2 into Formula 1, we can get the maximum allowable corner error The values are:
[0096] (Formula 3).
[0097] Step S203: Based on the corner error constraint condition of the joint, at least according to the maximum allowable corner error and the angle of the joint, determine a first joint speed of the joint.
[0098] The corner error constraint condition at the connection at least indicates: when the corner error at the connection does not exceed the maximum allowable corner error, the relationship between the maximum allowable corner error, the angle at the connection and the first connection speed.
[0099] During the CNC machining process, in order to ensure machining quality and improve production efficiency, the corner error generated during actual machining must not exceed the value of the maximum allowable corner error. While meeting the above-mentioned corner error constraint conditions at the joint, the first connection speed can be determined based on the relationship between the maximum allowable corner error, the angle at the joint, and the first connection speed indicated by the corner error constraint conditions at the joint. The maximum allowable corner error and the angle at the joint are used as the basis, and the first connection speed is determined according to the maximum allowable corner error and the angle.
[0100] In an optional embodiment, according to the derivation of formula 3, it can be concluded that when the angle between the track segments is , the first connection speed at the connection The following conditions must be met:
[0101] (Formula 4).
[0102] In an optional implementation, the first bridging speed may be determined according to the above formula 4; wherein, is the first connection speed, is the maximum allowable corner error, is the angle, is the position loop gain, is the feedforward coefficient.
[0103] In an embodiment of the present application, the value of the maximum allowable corner error, the value of the position loop gain, and the value of the feedforward coefficient can be pre-set by the user and input into the CNC system, so that during the speed planning process, the first connection speed of the connection can be determined based on the above-mentioned parameter values pre-set by the user, the angle of the connection, and the corner error constraint conditions of the connection.
[0104] Step S204: determining a target connecting speed at the connecting point according to the first connecting speed at the connecting point.
[0105] After determining the first connection speed based on the corner error constraint condition at the connection point, the target connection speed at the connection point can be determined based on the first connection speed. By obtaining the value of the first connection speed, if the target connection speed is not subject to other constraints, the value of the first connection speed can be used as the value of the target connection speed to implement speed planning for the trajectory segment to be processed, and processing is performed based on the target connection speed to form the trajectory segment.
[0106] It can be seen that the speed planning method provided in the embodiment of the present application can limit the connection speed by using the corner error constraint condition at the connection point, so as to ensure that the corner error generated when processing based on the connection speed during the actual processing does not exceed the maximum allowable corner error, thereby improving the smoothness of the processed surface. Therefore, the speed planning method provided in the embodiment of the present application can improve the processing quality.
[0107] As an optional implementation, Figure 5 This is another optional flow chart of the speed planning method provided in the embodiment of the present application. Figure 5 and Figure 2 The same steps can be referred to the description in the corresponding part above.
[0108] In an optional implementation, combined with Figure 2 and Figure 5 , Figure 2 The numerical control machining parameters determined in step S202 may also include the maximum acceleration of the machine tool.
[0109] In actual machining, the connection speed at the connection point of the trajectory segments may also be subject to acceleration constraints. Based on this, the speed planning method may further include step S503: determining a second connection speed at the connection point based on the acceleration constraint at the connection point, at least according to the maximum acceleration of the machine tool and the angle at the connection point.
[0110] The acceleration constraint condition at the connection point at least indicates: when the speed direction at the connection point changes, the relationship between the maximum acceleration, the angle at the connection point, and the second connection speed.
[0111] Furthermore, when the velocity direction at the junction changes, the product of the maximum acceleration and the interpolation period is not less than the change in the velocity vector at the junction. The change in the velocity vector at the junction can be determined based on the endpoint velocity value of the previous segment connected to the junction, the starting velocity value of the next segment, and the angle between the junctions; the endpoint velocity value of the previous segment is equal to the starting velocity value of the next segment.
[0112] During CNC machining, the product of maximum acceleration and interpolation period represents the maximum velocity change a CNC machine tool can achieve within one interpolation period when performing interpolation (i.e., the process of generating the actual machining trajectory of the machine tool). If the change in the velocity vector at the connection exceeds this maximum velocity change, the machine tool will not be able to achieve the required velocity change within the specified interpolation period, resulting in mechanical overload and even damage to the machine tool or tool.
[0113] Therefore, to ensure the stability and safety of the machining process, when the velocity direction at the joint changes, it is necessary to ensure that the change in the velocity vector at the joint does not exceed the product of the maximum acceleration and the interpolation period. If the acceleration constraints at the joint are met, the second joint speed can be determined based on the relationship between the maximum acceleration indicated by the acceleration constraints at the joint, the angle at the joint, and the second joint speed, according to the maximum acceleration of the machine tool and the angle at the joint.
[0114] In an optional implementation, when the speed direction of the connection point changes, the second connection speed of the connection point can be determined according to the maximum acceleration, the angle of the connection point, and the interpolation period.
[0115] In an alternative embodiment, referring to Figure 6 , Figure 6 Schematic diagram of the change in velocity vector at the joint provided by the embodiment of the present application. i As the connection point, P i-1 P i is the previous trajectory segment, P i P i+1 is the next trajectory segment, is the angle between the two track segments. i At , the end velocity of the previous trajectory segment is equal to the starting velocity of the next trajectory segment, both of which are The velocity direction changes in the two interpolation cycles before and after the connection point Pi, and the change in the velocity vector can be expressed as:
[0116] (Formula 5).
[0117] Due to the change in velocity vector The maximum speed change, i.e. the maximum acceleration of the machine tool, must not be exceeded. and interpolation cycle The maximum acceleration of the machine tool should meet the following conditions:
[0118] (Formula 6).
[0119] Substituting the above formula 5 into formula 6 and deriving it, we can get the second connection speed The following conditions should be met:
[0120] (Formula 7).
[0121] Furthermore, according to the above formula 7, the second connection speed can be determined.
[0122] Step S504: taking the minimum value of the first connecting speed and the second connecting speed at the connecting point as the target connecting speed at the connecting point.
[0123] In an embodiment of the present application, to ensure that the final target connection speed satisfies both the corner error and maximum machine acceleration constraints, after determining the first and second connection speeds, the minimum of the first and second connection speeds can be taken as the target connection speed for the connection, for speed planning of the trajectory segment to be processed. Processing is then performed based on the target connection speed to form the trajectory segment. Speed planning based on the target connection speed can improve processing quality and efficiency, while avoiding machine overload and enhancing the stability and safety of the processing process.
[0124] It can be seen that the speed planning method provided in the embodiment of the present application is to limit the connection speed at the connection point through the corner error constraint condition, so as to ensure that the corner error generated when processing based on the connection speed during the actual processing does not exceed the maximum allowable corner error, thereby improving the smoothness of the processed surface. Therefore, the speed planning method provided in the present application can improve the processing quality. Furthermore, the speed planning method provided in the embodiment of the present application can also limit the connection speed through the acceleration constraint condition at the connection point to avoid causing mechanical overload, improve the stability and safety of the processing process, and thus improve the processing quality.
[0125] The embodiment of the present application further provides a method for determining an interpolation point, the method comprising: obtaining a target connection speed at a connection point between trajectory segments to be processed, wherein the target connection speed at the connection point is determined based on the speed planning method described above;
[0126] The interpolation points in the NC machining process are determined according to the target connection speed at the connection between the trajectory segments to be processed.
[0127] Specifically, based on the speed planning method described above, the target connection speed between the path segments to be processed can be determined. After completing the speed planning, the value of the target connection speed can be obtained and transmitted to the interpolator. Then, the interpolator can determine the interpolation point in the CNC machining process according to the target connection speed, and process the trajectory segment based on the interpolation point.
[0128] The following describes the speed planning device provided in the embodiments of the present application. The speed planning device described below can be considered as the functional module required for the numerical control device to implement a speed planning method provided in the embodiments of the present application. The speed planning device described below can be referenced in conjunction with the solution described above.
[0129] Figure 7 This is a schematic diagram of a speed planning device provided in an embodiment of the present application. The device can be applied to a numerical control system. Figure 7 , the apparatus may include:
[0130] A trajectory segment determination module 710 is configured to obtain a plurality of numerical control program segments and determine a plurality of trajectory segments to be processed based on the plurality of numerical control program segments;
[0131] The parameter acquisition module 720 is used to acquire numerical control machining parameters, wherein the numerical control machining parameters include at least the angle between the connection points of the trajectory segments and the maximum allowable corner error of the connection points;
[0132] A first connecting speed determining module 730 is configured to determine a first connecting speed at the connection based on a corner error constraint at the connection, at least according to a maximum allowable corner error and an angle at the connection; wherein the corner error constraint at the connection at least indicates: a relationship between the maximum allowable corner error, the angle at the connection, and the first connecting speed, provided that the corner error at the connection does not exceed the maximum allowable corner error;
[0133] The target connecting speed determining module 740 is configured to determine a target connecting speed at the connecting point according to the first connecting speed at the connecting point.
[0134] In an optional implementation, the first connecting speed determining module 730 is configured to determine the first connecting speed at the connecting location based on the corner error constraint at the connecting location, at least according to the maximum allowable corner error and the angle at the connecting location, including:
[0135] When the corner error at the joint does not exceed the maximum allowable corner error, the first joint speed is determined according to the maximum allowable corner error at the joint, the angle of the joint, the position loop gain and the feedforward coefficient of the numerical control system.
[0136] In an optional implementation, the first connection speed determining module 730 is configured to determine the first connection speed based on the maximum allowable corner error of the connection, the angle of the connection, the position loop gain and the feedforward coefficient of the numerical control system, including:
[0137] According to the formula , determining the first connection speed;
[0138] in, is the first connection speed, is the maximum allowable corner error, is the angle, is the position loop gain, is the feedforward coefficient.
[0139] In an optional implementation, the maximum allowable corner error at the connection is: the maximum composite error corresponding to the steady-state errors of the two trajectory segments connected at the connection; wherein, when the steady-state errors of the two trajectory segments are equal, the composite error corresponding to the steady-state errors of the two trajectory segments is the maximum composite error.
[0140] In an optional implementation, the CNC machining parameters further include: a maximum acceleration of the machine tool;
[0141] The target connection speed determination module 740 is used to determine the second connection speed of the connection based on the acceleration constraint condition of the connection, at least according to the maximum acceleration of the machine tool and the angle of the connection; wherein the acceleration constraint condition of the connection at least indicates: when the speed direction of the connection changes, the relationship between the maximum acceleration, the angle of the connection and the second connection speed.
[0142] In an optional implementation, when the velocity direction at the junction changes, the product of the maximum acceleration and the interpolation period is not less than the change in the velocity vector at the junction;
[0143] Among them, the change in the velocity vector at the connection point is determined based on the endpoint velocity value of the previous trajectory segment connected to the connection point, the starting velocity value of the next trajectory segment, and the angle at the connection point; the endpoint velocity value of the previous trajectory segment is equal to the starting velocity value of the next trajectory segment.
[0144] In an optional implementation, the target connection speed determination module 740 is configured to determine the second connection speed at the connection based on the acceleration constraint condition at the connection, at least according to the maximum acceleration of the machine tool and the angle of the connection, including:
[0145] In the case where the speed direction of the connection point changes, the second connection speed of the connection point is determined according to the maximum acceleration, the angle of the connection point, and the interpolation period.
[0146] In an optional implementation, the target connection speed determination module 740 is configured to determine the second connection speed at the connection according to the maximum acceleration, the angle at the connection, and the interpolation period, including:
[0147] According to the formula , determining the second connection speed;
[0148] in, is the second connection speed, is the maximum acceleration, is the angle, is the interpolation period.
[0149] In an optional implementation, the target connecting speed determining module 740 is configured to determine the target connecting speed at the connecting point according to the first connecting speed at the connecting point, including:
[0150] The minimum value of the first connection speed and the second connection speed at the connection point is taken as the target connection speed at the connection point.
[0151] In an optional implementation, the trajectory segment determination module 710 is configured to obtain a plurality of numerical control program segments, including:
[0152] Based on the maximum number of trajectory segments for speed planning, a corresponding plurality of NC program segments are obtained;
[0153] The trajectory segment determination module 710 is configured to determine, based on the plurality of numerical control program segments, a plurality of trajectory segments to be processed, including:
[0154] Based on the multiple numerical control program segments, the trajectory segments are classified into straight line segments, arc segments and line segments to be fitted according to the types of the trajectory segments, and the line segments to be fitted are fitted into continuous curves.
[0155] In an optional implementation, the connection point is: a connection point between straight line segments.
[0156] An embodiment of the present application also provides a numerical control device, comprising: at least one processor and at least one memory, wherein the memory stores one or more computer-executable instructions, and the processor calls the one or more computer-executable instructions to execute any one of the speed planning methods and the interpolation point determination methods described in the aforementioned embodiments.
[0157] An embodiment of the present application further provides a numerical control system, comprising at least: the numerical control device as described in the aforementioned embodiment.
[0158] An embodiment of the present application further provides a storage medium, comprising: the storage medium storing one or more computer executable instructions, wherein when the one or more computer executable instructions are executed, the speed planning method and the interpolation point determination method as described in the aforementioned embodiment are implemented.
[0159] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of the speed planning method and the interpolation point determination method described in the above embodiments are implemented.
[0160] The above describes a plurality of embodiment schemes provided by the embodiments of the present application. The various optional modes introduced in the various embodiment schemes can be combined with each other and cross-referenced without conflict, thereby extending a variety of possible embodiment schemes, which can all be considered as the embodiment schemes disclosed and disclosed in the embodiments of the present application. Although the embodiments of the present application are disclosed as above, the present application is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present application, and therefore the scope of protection of the present application should be based on the scope defined by the claims.
Claims
1. A speed planning method, characterized in that: include: Get multiple NC program segments; Based on the multiple numerical control program segments, determining multiple trajectory segments to be processed; Acquire numerical control machining parameters, the numerical control machining parameters at least including: the angle between the connection points between the track segments and the maximum allowable corner error at the connection points, the maximum allowable corner error being the maximum allowable deviation between the corner actually machined at the connection point and the corner predetermined in the numerical control program; Based on the corner error constraint condition of the joint, at least according to the maximum allowable corner error and the degree of the included angle of the joint, determine the first joint speed of the joint; wherein the corner error constraint condition of the joint at least indicates: when the corner error of the joint does not exceed the maximum allowable corner error, the degree of the included angle of the joint and the first joint speed. Determine a target connection speed of the connection point according to a first connection speed of the connection point; Wherein, the determining of the first connection speed of the connection at least according to the maximum allowable corner error and the angle degree of the connection at the connection based on the corner error constraint condition of the connection includes: When the corner error of the joint does not exceed the maximum allowable corner error, the first joint speed is determined according to the maximum allowable corner error of the joint, the angle of the joint, the position loop gain and the feedforward coefficient of the numerical control system; Determining the first connection speed according to the maximum allowable corner error of the connection, the angle of the connection, the position loop gain and the feedforward coefficient of the numerical control system includes: According to the formula , determining the first connection speed; in, is the first connection speed, is the maximum allowable corner error, is the angle, is the position loop gain, is the feed-forward coefficient.
2. The speed planning method according to claim 1, characterized in that: The maximum allowable corner error at the connection is: the maximum composite error corresponding to the steady-state errors of the two trajectory segments connected at the connection; wherein, when the steady-state errors of the two trajectory segments are equal, the composite error corresponding to the steady-state errors of the two trajectory segments is the maximum composite error.
3. The speed planning method according to claim 1, characterized in that: The numerical control machining parameters also include: the maximum acceleration of the machine tool; the method also includes: Based on the acceleration constraint condition of the joint, the second connection speed of the joint is determined according to at least the maximum acceleration of the machine tool and the angle of the joint; wherein the acceleration constraint condition of the joint at least indicates: when the speed direction of the joint changes, the relationship between the maximum acceleration, the angle of the joint and the second connection speed.
4. The speed planning method according to claim 3, characterized in that: When the velocity direction at the joint changes, the product of the maximum acceleration and the interpolation period is not less than the change in the velocity vector at the joint; Among them, the change of the velocity vector at the connection is determined based on the terminal velocity value of the previous trajectory segment connected to the connection, the starting velocity value of the next trajectory segment, and the angle of the connection; the terminal velocity value of the previous trajectory segment is equal to the starting velocity value of the next trajectory segment.
5. The speed planning method according to claim 4, characterized in that: The method of determining the second connection speed of the connection based on the acceleration constraint condition of the connection at least according to the maximum acceleration of the machine tool and the angle of the connection includes: A second connection speed at the connection is determined according to the maximum acceleration, the angle of the connection, and the interpolation period.
6. The speed planning method according to claim 5, characterized in that: Determining the second connection speed at the connection point according to the maximum acceleration, the angle of the connection point, and the interpolation period includes: According to the formula , determining the second connection speed; in, is the second connection speed, is the maximum acceleration, is the angle, is the interpolation cycle.
7. The speed planning method according to any one of claims 3 to 6, characterized in that: Determining a target connection speed at the connection point according to the first connection speed at the connection point includes: The minimum value between the first connection speed and the second connection speed at the connection point is taken as the target connection speed at the connection point.
8. The speed planning method according to claim 1, characterized in that: The obtaining of multiple numerical control program segments comprises: Based on the maximum number of trajectory segments for speed planning, a corresponding plurality of numerical control program segments are obtained; The step of determining a plurality of trajectory segments to be processed based on the plurality of numerical control program segments comprises: Based on the multiple numerical control program segments, the trajectory segments are classified into straight line segments, arc segments and line segments to be fitted according to the types of the trajectory segments, and the line segments to be fitted are fitted into continuous curves.
9. The speed planning method according to claim 8, characterized in that: The connecting part is: the connecting part between straight line segments.
10. A method for determining an interpolation point, characterized in that: include: Obtaining a target connection speed at a connection point between trajectory segments to be processed, wherein the target connection speed at the connection point is determined based on the speed planning method according to any one of claims 1 to 9; The interpolation point in the CNC machining process is determined according to the target connection speed at the connection between the trajectory segments to be processed.
11. A speed planning device, characterized in that: include: A trajectory segment determination module, used for acquiring a plurality of numerical control program segments, and determining a plurality of trajectory segments to be processed based on the plurality of numerical control program segments; A parameter acquisition module is used to acquire numerical control machining parameters, wherein the numerical control machining parameters include at least: the angle between the connection points between the track segments and the maximum allowable corner error at the connection point, wherein the maximum allowable corner error is the maximum allowable deviation between the corner actually machined at the connection point and the corner predetermined in the numerical control program; A first connection speed determination module is used to determine a first connection speed at the connection based on a corner error constraint condition at the connection, at least according to a maximum allowable corner error and an angle degree at the connection; wherein the corner error constraint condition at the connection at least indicates: when the corner error at the connection does not exceed the maximum allowable corner error, a relationship between the maximum allowable corner error, the angle degree at the connection, and the first connection speed; A target connection speed determination module, used to determine a target connection speed of the connection point according to a first connection speed of the connection point; Wherein, the determining of the first connection speed of the connection at least according to the maximum allowable corner error and the angle degree of the connection at the connection based on the corner error constraint condition of the connection includes: When the corner error of the joint does not exceed the maximum allowable corner error, the first joint speed is determined according to the maximum allowable corner error of the joint, the angle of the joint, the position loop gain and the feedforward coefficient of the numerical control system; Determining the first connection speed according to the maximum allowable corner error of the connection, the angle of the connection, the position loop gain and the feedforward coefficient of the numerical control system includes: According to the formula , determining the first connection speed; in, is the first connection speed, is the maximum allowable corner error, is the angle, is the position loop gain, is the feed-forward coefficient.
12. A numerical control device, characterized in that: include: At least one processor and at least one memory, wherein the memory stores one or more computer executable instructions, and the processor calls the one or more computer executable instructions to execute the speed planning method according to any one of claims 1 to 9 and the interpolation point determination method according to claim 10.
13. A numerical control system, characterized in that: At least: The numerical control device as claimed in claim 12.
14. A storage medium, characterized in that: The storage medium stores one or more computer executable instructions, and when the one or more computer executable instructions are executed, the speed planning method according to any one of claims 1 to 9 and the interpolation point determination method according to claim 10 are implemented.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the speed planning method according to any one of claims 1 to 9 and the steps of the interpolation point determination method according to claim 10 are implemented.
Citation Information
Patent Citations
S-curve acceleration and deceleration speed planning and control method for logistics carrying equipment
CN109991932A
Corner transition smoothing method for smoothing axial jerk
CN111897290A
Numerical control machining method and device
CN114115112A
Method and device for controlling trajectory error generated by speed filtering and storage medium
CN114755975A
Machine learning device, acceleration / deceleration adjustment device, and computer-readable storage medium
CN117203591A
