A control method and system of a numerical control machine tool and an electronic device

By generating ellipse and circle equations, the starting and ending points of the arc on the CNC machine tool are determined, and acceleration and deceleration planning is performed. This solves the problem of large interpolation error in elliptical arcs on CNC machine tools and improves machining accuracy.

CN117666476BActive Publication Date: 2025-11-25ZHONGSHAN YINGWEITENG ELECTRIC TECHNOLOGY CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311673942.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-06
Publication Date
2025-11-25
Estimated Expiration
2043-12-06

AI Technical Summary

Technical Problem

In the existing technology, when CNC machine tools are machining elliptical arcs, the use of the Gauss-Legend quadrature formula to calculate the approximate arc length results in large interpolation errors, making it impossible to accurately reach the target endpoint and reducing machining accuracy.

Method used

By generating ellipse and circle equations, determining the starting and ending points of the arc, performing acceleration and deceleration planning, and calculating the target coordinates for each interpolation cycle, we can ensure that the interpolation point is located on the ellipse arc and avoid calculation errors.

Benefits of technology

It improves the machining accuracy of CNC machine tools, reduces elliptical arc interpolation errors, and ensures the accuracy of interpolation points.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117666476B_ABST
    Figure CN117666476B_ABST
Patent Text Reader

Abstract

The application discloses a control method and system of a numerical control machine tool and electronic equipment, and belongs to the technical field of numerical control. The control method of the numerical control machine tool comprises the following steps: determining a target machining track of the numerical control machine tool; if the target machining track is an elliptic arc, generating an elliptic equation of the target machining track; determining a circle equation corresponding to the elliptic equation, and determining a circular arc starting point and a circular arc ending point according to an end point of the target machining track and the circle equation; performing acceleration and deceleration planning according to the circular arc starting point and the circular arc ending point, and determining a target coordinate of each interpolation period according to the acceleration and deceleration planning result; and controlling the numerical control machine tool to perform machining according to the target coordinate. The application can reduce the interpolation error of the elliptic arc and improve the machining precision of the numerical control machine tool.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of numerical control technology, and in particular to a control method, system and electronic equipment for a numerical control machine tool. Background Technology

[0002] In the process of CNC machining of complex contour parts, it is often necessary to perform elliptical arc or elliptical trajectory machining according to customer requirements. Therefore, it is necessary to integrate elliptical arc interpolation commands into the CNC system. Elliptical arc interpolation requires the joint control of interpolation actions on the horizontal and vertical coordinates to generate the elliptical arc. Therefore, the interpolation coordinates calculated by elliptical arc interpolation must lie on the elliptical arc.

[0003] In existing technologies, the Gauss-Legend quadrature formula is typically used to calculate the approximate arc length, and elliptical interpolation is performed based on this approximate arc length. However, since the approximate arc length inevitably contains calculation errors, the above scheme cannot perform acceleration / deceleration planning based on the approximate arc length, thus failing to reach the target endpoint of the elliptical arc and resulting in low control accuracy.

[0004] Therefore, how to reduce the interpolation error of elliptical arcs and improve the machining accuracy of CNC machine tools is a technical problem that needs to be solved by those skilled in the art. Summary of the Invention

[0005] The purpose of this application is to provide a control method, system, and electronic equipment for CNC machine tools, which can reduce the interpolation error of elliptical arcs and improve the machining accuracy of CNC machine tools.

[0006] To address the aforementioned technical problems, this application provides a control method for a CNC machine tool, the control of which includes:

[0007] Determine the target machining trajectory for the CNC machine tool;

[0008] If the target machining trajectory is an elliptical arc, then the ellipse equation of the target machining trajectory is generated;

[0009] Determine the circle equation corresponding to the ellipse equation, and determine the starting point and ending point of the arc based on the endpoints of the target processing trajectory and the circle equation;

[0010] Acceleration and deceleration planning is performed based on the starting point and ending point of the arc, and the target coordinates for each interpolation cycle are determined based on the acceleration and deceleration planning results.

[0011] The CNC machine tool is controlled to perform machining based on the target coordinates.

[0012] Optionally, acceleration / deceleration planning is performed based on the starting point and ending point of the arc, including:

[0013] Calculate the arc length based on the arc start point and the arc end point;

[0014] Acceleration and deceleration planning is performed based on the arc length, the center coordinates of the circle equation, and the machining direction of the target machining trajectory to obtain the acceleration and deceleration planning result; wherein, the acceleration and deceleration planning result includes the linear velocity of each interpolation cycle.

[0015] Optionally, determining the target coordinates for each interpolation cycle based on the acceleration / deceleration planning results includes:

[0016] Calculate the circular angular velocity corresponding to each interpolation cycle based on the linear velocity of each interpolation cycle in the acceleration / deceleration planning results;

[0017] The centrifugal angle for each interpolation cycle is calculated based on the circular angular velocity.

[0018] The target coordinates for each interpolation cycle are determined based on the eccentric angle.

[0019] Optionally, calculating the eccentric angle for each interpolation cycle based on the circular angular velocity includes:

[0020] The arc angle increment for each interpolation cycle is calculated based on the arc angular velocity.

[0021] The centrifugal angle of each interpolation cycle is calculated based on the arc angle increment of each interpolation cycle.

[0022] Optionally, determining the starting and ending points of the arc based on the endpoints of the target machining trajectory and the circle equation includes:

[0023] An auxiliary line in a preset direction is generated through the endpoint of the target processing trajectory; wherein, the preset direction is a direction perpendicular to the semi-major axis;

[0024] The starting point and ending point of the arc are determined based on the intersection of the auxiliary line and the circle equation.

[0025] Optionally, generating auxiliary lines in a preset direction through the endpoints of the target processing trajectory includes:

[0026] Determine the starting point and ending point of the target machining trajectory;

[0027] A first auxiliary line in the preset direction is generated through the processing starting point;

[0028] A second auxiliary line in the preset direction is generated after the processing endpoint.

[0029] Optionally, determining the starting point and ending point of the arc based on the intersection of the auxiliary line and the circle equation includes:

[0030] Determine the first intersection point between the first auxiliary line and the circle equation, and set the first intersection point that is in the same quadrant or on the same coordinate axis as the processing starting point as the arc starting point;

[0031] Determine the second intersection point between the second auxiliary line and the circle equation, and set the second intersection point, which is in the same quadrant or on the same coordinate axis as the machining endpoint, as the endpoint of the arc.

[0032] Optionally, determining the circle equation corresponding to the ellipse equation includes:

[0033] Determine the endpoint line connecting the starting point and the ending point of the target processing trajectory;

[0034] Determine whether the projected length of the line connecting the endpoints in the preset direction is greater than the semi-minor axis length of the ellipse equation;

[0035] If so, then the equation of the circle is generated with the center of the ellipse as the center and the length of the semi-major axis as the radius;

[0036] If not, then the circle equation is generated with the center of the ellipse as the center and the length of the semi-major axis or semi-minor axis as the radius.

[0037] This application also provides a control system for a CNC machine tool, the system comprising:

[0038] The trajectory determination module is used to determine the target machining trajectory of the CNC machine tool;

[0039] An ellipse equation generation module is used to generate the ellipse equation of the target machining trajectory if the target machining trajectory is an elliptical arc.

[0040] The arc determination module is used to determine the circle equation corresponding to the ellipse equation, and to determine the arc start point and arc end point based on the endpoints of the target machining trajectory and the circle equation.

[0041] The interpolation calculation module is used to perform acceleration and deceleration planning based on the starting point and ending point of the arc, and to determine the target coordinates for each interpolation cycle based on the acceleration and deceleration planning results.

[0042] The control module is used to control the CNC machine tool to perform machining based on the target coordinates.

[0043] This application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor, when calling the computer program in the memory, implements the steps of the control method for the CNC machine tool described above.

[0044] This application provides a control method for a CNC machine tool, comprising: determining a target machining trajectory of the CNC machine tool; if the target machining trajectory is an elliptical arc, generating an ellipse equation for the target machining trajectory; determining a circle equation corresponding to the ellipse equation, and determining the starting point and ending point of the circle based on the endpoints of the target machining trajectory and the circle equation; performing acceleration / deceleration planning based on the starting point and ending point of the circle, and determining the target coordinates for each interpolation cycle based on the acceleration / deceleration planning results; and controlling the CNC machine tool to perform machining based on the target coordinates.

[0045] This application, after determining that the target machining trajectory of the CNC machine tool is an elliptical arc, generates the elliptical equation of the target machining trajectory, and then generates the corresponding circular equation based on the elliptical equation. Based on the endpoints of the target machining trajectory and the circular equation, this application determines the starting and ending points of the circular arc, and then performs acceleration / deceleration planning based on the starting and ending points of the circular arc to obtain the target coordinates of the CNC machine tool in each interpolation cycle, so that machining can be performed based on these target coordinates. The target coordinates calculated in this application for each interpolation cycle are directly obtained from the elliptical equation, ensuring that the target coordinates lie on the target machining trajectory, thus avoiding calculation errors in the elliptical arc interpolation process. Therefore, this application can reduce the interpolation error of elliptical arcs and improve the machining accuracy of the CNC machine tool. This application also provides a control system for a CNC machine tool and an electronic device, which have the above-mentioned beneficial effects, and will not be elaborated further here. Attached Figure Description

[0046] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0047] Figure 1 A flowchart illustrating a control method for a CNC machine tool provided in an embodiment of this application;

[0048] Figure 2 This is a schematic diagram of the first method for generating a circle equation provided in an embodiment of this application;

[0049] Figure 3 This is a schematic diagram of the second method for generating a circle equation provided in an embodiment of this application;

[0050] Figure 4 A flowchart of an elliptical arc interpolation provided in an embodiment of this application;

[0051] Figure 5 A schematic diagram illustrating a method for determining the starting and ending points of an arc, as provided in an embodiment of this application;

[0052] Figure 6This is a schematic diagram of an elliptical arc trajectory simulation provided in an embodiment of this application;

[0053] Figure 7 This is a simulation diagram of a circular arc velocity curve provided in an embodiment of this application;

[0054] Figure 8 This is a schematic diagram illustrating the verification result of the standard equation of an elliptic arc provided in an embodiment of this application;

[0055] Figure 9 A schematic diagram illustrating the verification of the sum of distances from an elliptical arc interpolation point to the focal point, provided in an embodiment of this application.

[0056] Figure 10 This is a schematic diagram of the structure of an elliptic interpolation control device provided in an embodiment of this application. Detailed Implementation

[0057] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0058] Please see below. Figure 1 , Figure 1 This is a flowchart illustrating a control method for a CNC machine tool provided in an embodiment of this application.

[0059] Specific steps may include:

[0060] S101: Determine the target machining trajectory for the CNC machine tool;

[0061] This embodiment can be applied to the PLC controller of a CNC machine tool, or to electronic devices connected to the CNC machine tool. Prior to this step, there may be an operation that receives CNC machining tasks, and the target machining trajectory can be determined based on the CNC machining tasks.

[0062] S102: If the target machining trajectory is an elliptical arc, then generate the ellipse equation of the target machining trajectory;

[0063] After determining the target machining trajectory, its shape can be determined. If the target machining trajectory is an elliptical arc, then the ellipse equation of the target machining trajectory is generated. Specifically, the ellipse equation can be an ellipse parametric equation or an ellipse standard equation.

[0064] S103: Determine the circle equation corresponding to the ellipse equation, and determine the starting point and ending point of the arc based on the endpoints of the target processing trajectory and the circle equation;

[0065] In this embodiment, the corresponding circle equation can be determined based on the ellipse equation. This circle equation serves as an interpolation equation to aid in describing the interpolation position of the target machining trajectory. This application can determine the starting and ending points of the circular arc based on the positional relationship between the endpoints of the target machining trajectory and the circle equation. The aforementioned starting and ending points of the circular arc are points on the circle equation.

[0066] As a further explanation of S102, the circle equation and the starting and ending points of the arc can be determined in the following way:

[0067] The center of the ellipse and the target axis length are determined according to the ellipse equation, and a circle equation is generated with the ellipse center as the center and the target axis length as the radius; an auxiliary line with a preset direction is generated through the endpoint of the target processing trajectory; the starting point and ending point of the arc are determined according to the intersection of the auxiliary line and the circle equation.

[0068] Specifically, in this embodiment, after obtaining the ellipse equation, the coordinates of the ellipse center and the target axis length can be determined based on the parameters in the ellipse equation. The target axis length can be the length of the semi-major axis or the semi-minor axis of the ellipse equation. This embodiment can generate a circle equation with the coordinates of the ellipse center as the center and the target axis length as the radius. Before generating auxiliary lines in a preset direction, this embodiment can determine a preset direction based on the ellipse equation; this preset direction is perpendicular to the semi-major axis. In this embodiment, the endpoints of the target machining trajectory include a machining start point and a machining end point. Therefore, two auxiliary lines corresponding to the machining start point and machining end point can be obtained. The starting point and ending point of the arc are determined based on the intersection of these two auxiliary lines and the circle equation.

[0069] S104: Perform acceleration / deceleration planning based on the starting point and ending point of the arc, and determine the target coordinates for each interpolation cycle based on the acceleration / deceleration planning results;

[0070] After obtaining the starting point and ending point of the arc, the arc corresponding to the projection of the target machining trajectory onto the circle equation can be determined. Based on this arc, the acceleration and deceleration of the CNC machine tool on the target machining trajectory can be planned, thereby obtaining the linear velocity of the CNC machine tool in each interpolation cycle. Based on this linear velocity, the centrifugal angle of the CNC machine tool in each interpolation cycle can be calculated, and then the target coordinates, i.e., the interpolation point coordinates, can be determined according to the centrifugal angle in each interpolation cycle.

[0071] S105: Control the CNC machine tool to perform machining according to the target coordinates.

[0072] After obtaining the target coordinates for each interpolation cycle, control can be performed according to each target coordinate so that the CNC machine tool can perform machining according to the target machining trajectory.

[0073] In this embodiment, after determining that the target machining trajectory of the CNC machine tool is an elliptical arc, the elliptical equation of the target machining trajectory is generated. Then, a circular equation is generated based on the ellipse center and the target axis length. This embodiment generates auxiliary lines in a preset direction through the endpoints of the target machining trajectory. The starting and ending points of the circular arc are determined based on the intersection of the auxiliary lines and the circular equation. Acceleration and deceleration planning is then performed based on the starting and ending points of the circular arc to obtain the target coordinates of the CNC machine tool in each interpolation cycle, allowing machining to be performed based on these target coordinates. In this embodiment, the target coordinates for each interpolation cycle are directly calculated using the elliptical equation, ensuring that the target coordinates lie on the target machining trajectory, thus avoiding calculation errors in the elliptical arc interpolation process. Therefore, this embodiment can reduce the interpolation error of elliptical arcs and improve the machining accuracy of the CNC machine tool.

[0074] As for Figure 1 A further description of the corresponding embodiment suggests that acceleration / deceleration planning can be performed as follows: The arc length is calculated based on the arc's starting point and ending point; acceleration / deceleration planning is then performed based on the arc length, the center coordinates of the circle equation, and the machining direction of the target machining trajectory to obtain the acceleration / deceleration planning result; wherein, the acceleration / deceleration planning result includes the linear velocity of each interpolation cycle. The above acceleration / deceleration planning includes, but is not limited to, T-shaped acceleration / deceleration planning and S-shaped acceleration / deceleration planning.

[0075] Specifically, in this embodiment, the linear velocity of each interpolation cycle can be calculated based on the linear velocity of each interpolation cycle in the acceleration / deceleration planning results; the eccentric angle of each interpolation cycle can be calculated based on the eccentric angle, and then the target coordinates of each interpolation cycle can be determined based on the eccentric angle. The process of calculating the eccentric angle of each interpolation cycle is as follows: calculate the arc angle increment of each interpolation cycle based on the arc angle velocity; calculate the eccentric angle of each interpolation cycle based on the arc angle increment of each interpolation cycle.

[0076] As for Figure 1 In a further description of the corresponding embodiment, based on the obtained circle equation, the starting point and ending point of the arc can be determined in the following way: an auxiliary line with a preset direction is generated through the endpoint of the target processing trajectory; wherein, the preset direction is a direction perpendicular to the semi-major axis; the starting point and ending point of the arc are determined according to the intersection of the auxiliary line and the circle equation.

[0077] Furthermore, the above process can generate auxiliary lines in the following way: determine the processing start point and processing end point of the target processing trajectory; generate a first auxiliary line in the preset direction through the processing start point; generate a second auxiliary line in the preset direction through the processing end point.

[0078] Since both the first and second auxiliary lines will have two intersection points with the circle equation, if the center of the circle equation is at the origin, this embodiment can determine the starting point and ending point of the arc in the following way: determine the first intersection point of the first auxiliary line with the circle equation, and set the first intersection point that is in the same quadrant or the same coordinate axis as the processing starting point as the starting point of the arc; determine the second intersection point of the second auxiliary line with the circle equation, and set the second intersection point that is in the same quadrant or the same coordinate axis as the processing ending point as the ending point of the arc.

[0079] Please see Figure 2 and Figure 3 , Figure 2 This is a schematic diagram of the first method for generating a circle equation provided in an embodiment of this application. Figure 3 This is a schematic diagram of the second method for generating a circle equation provided in this application embodiment. In the diagram, P1 is the processing start point, P2 is the processing end point, and L1 and L2 represent auxiliary lines. To avoid situations where the intersection of the auxiliary line and the circle equation cannot be found, the circle equation can be generated in the following way: determine the endpoint line connecting the processing start point and the processing end point of the target processing trajectory; determine whether the projection length of the endpoint line in the preset direction is greater than the semi-minor axis length of the ellipse equation; if so, generate a circle with the center of the ellipse as the center and the length of the semi-major axis as the radius. Figure 2 The equation of the circle shown; if not, then generate a circle with the center of the ellipse as the center and the length of the semi-major axis or semi-minor axis as the radius, as shown. Figure 3 The equation of the circle is shown.

[0080] The process described in the above embodiments is illustrated below through examples in practical applications.

[0081] Interpolation in CNC machine tools refers to the process by which the CNC system determines the tool's motion trajectory using a certain method. Currently, when machining along an elliptical arc trajectory, CNC machine tools lack an analytical solution for calculating the arc length of the ellipse. One related technique uses the Gauss-Legend quadrature formula to calculate an approximate arc length, which inevitably contains calculation errors. This method cannot directly reach the interpolation endpoint through acceleration / deceleration planning, thus requiring endpoint determination. This increases the complexity of the interpolation process and, because it cannot directly reach the target endpoint through acceleration / deceleration planning, results in unsatisfactory machining effects. Another related technique uses an approximate step angle calculation formula for circular interpolation. However, this method introduces errors in calculating the elliptical eccentric angle, again requiring endpoint determination to reach the elliptical arc endpoint, leading to lower machining accuracy on the CNC machine tool.

[0082] To address the aforementioned technical problems, this embodiment provides a simple, high-speed, and high-precision elliptical arc interpolation scheme. This embodiment can be applied to programmable logic control systems, numerical control systems, and robot control systems to achieve real-time interpolation of motion trajectories. This embodiment calculates the eccentric angle of each period of the elliptical arc through interpolation of the semi-major axis circular arc. The abscissa and ordinate of the elliptical arc can be directly calculated based on the parametric equation of the elliptical arc. This embodiment supports users in implementing two-axis elliptical arc interpolation trajectories in a planar coordinate system, avoiding the difficulties in numerically calculating the elliptical arc length and the errors in calculating the eccentric angle increment based on the differential of the elliptical arc length. Please refer to [link to relevant documentation]. Figure 4 , Figure 4 A flowchart of an elliptical arc interpolation provided in this application embodiment specifically includes the following steps:

[0083] Step 1: Represent the trajectory of the ellipse using the parametric equation of the ellipse.

[0084] Specifically, this embodiment uses the parametric form of the standard ellipse equation. The ellipse represents the trajectory of the ellipse containing the elliptical arc, where 'a' is the length of the semi-major axis of the elliptical arc, 'b' is the length of the semi-minor axis of the elliptical arc, the semi-major axis and semi-minor axis of the elliptical arc coincide with the coordinate system, and 'θ' is the eccentric angle of the elliptical arc.

[0085] The standard equation of the elliptic arc is:

[0086] The parametric equation of the elliptical arc is as follows:

[0087] Step 2: Generate an arc with the center of the ellipse as the center and the semi-major axis a as the radius.

[0088] Specifically, in this embodiment, the semi-major axis arc C1 can be generated with the semi-major axis a as the radius and the center point of the elliptical arc as the center.

[0089] Step 3: Based on the coordinates of the starting and ending points of the ellipse, calculate the starting and ending points of the arc C1 using the lines x = x0 and x = x1.

[0090] Please see Figure 5 , Figure 5 This is a schematic diagram illustrating a method for determining the starting and ending points of an arc according to an embodiment of this application. In the diagram, x and y represent coordinate axes, a represents the semi-major axis of the ellipse, b represents the semi-minor axis of the ellipse, F1 and F2 represent the foci of the ellipse, S represents the starting point of the elliptical arc (i.e., the starting point of processing), E represents the ending point of the elliptical arc (i.e., the ending point of processing), S0 represents the starting point of the arc, E0 represents the ending point of the arc, O is the center of the elliptical arc, and θ represents the angle between the vectors from the starting point S0 and the ending point E0 of the arc to the center O.

[0091] Given an elliptical arc with a starting point S(x0,y0), an ending point E(x1,y1), a center point O(0,0), a counterclockwise rotation direction, a semi-major axis length of a, and a semi-minor axis length of b.

[0092] The intersection point of the line x = x0 and the arc C1 is S0(x0, y2). This intersection point S0 is the starting coordinate of the arc. If y0 > 0, then... If y0≤0, then

[0093] The intersection point of the line x = x1 and the arc C1 is E0(x1, y3). This intersection point E0 is the coordinate of the endpoint of the arc. If y1 > 0, then... If y1≤0, then

[0094] The angle θ between the vectors from the starting point S0 and the ending point E0 of arc C1 to the center O is calculated as follows:

[0095]

[0096] Similarly, the starting angle θ0 between the starting point S0 of arc C1 and the starting abscissa can be obtained. The starting angle θ0 is the starting angle of the arc.

[0097] Based on the included angle θ, the arc length from the starting point S0 to the ending point E0 of the arc C1 can be calculated as L = R * θ, where R is the radius a of the arc.

[0098] Step 4: Calculate the linear velocity of the current interpolation cycle based on the semi-major axis arc parameters.

[0099] Specifically, in this embodiment, acceleration and deceleration planning can be performed based on the parameters of the semi-major axis circular arc C1, and the linear velocity v of the circular arc in each interpolation cycle can be calculated. The acceleration and deceleration planning includes, but is not limited to, T-type acceleration and deceleration planning and S-type acceleration and deceleration planning.

[0100] Step 5: Calculate the eccentric angle of the current interpolation period of the ellipse.

[0101] Specifically, this embodiment can calculate the eccentric angle of the current interpolation period of the elliptical arc, where the eccentric angle β is the angular increment between the current interpolation point of the semi-major axis circular arc C1 and the starting point S0 of the arc. Based on the linear velocity v of the arc, the angular velocity w = v * R can be calculated, where R is the radius a of the arc.

[0102] The arc angle increment Δβ for each interpolation cycle can be calculated from the angular velocity w, where Ts is the interpolation cycle. The angle β between the interpolation point and the arc starting point S0 in each interpolation cycle is β' + Δβ. The angle β' is the centrifugal angle of the elliptical arc in the previous interpolation cycle.

[0103] Step 6: Calculate the coordinates of the interpolation point for the next interpolation cycle based on the eccentric angle.

[0104] After step six, it can be determined whether the acceleration / deceleration planning is complete; if yes, the interpolation ends; if not, proceed to step four.

[0105] This embodiment can calculate the x and y coordinates of the elliptical arc for the next interpolation cycle based on the eccentric angle. If the rotation direction of the elliptical arc is counterclockwise, then the x and y coordinates of the elliptical arc for the next interpolation cycle are respectively... If the rotation direction of the elliptical arc is clockwise, then the x-coordinate and y-coordinate of the next interpolation period of the elliptical arc are respectively...

[0106] The interpolation point calculation formula in this embodiment is directly given by the parameterized equation of the elliptical arc, therefore the calculated interpolation point must lie on the elliptical arc. This embodiment avoids the complex numerical solution calculation method for the elliptical arc length and the method of calculating the eccentric angle increment of the elliptical arc by differentiating small line segments. By calculating the eccentric angle increment in the manner of calculating the arc displacement increment, the eccentric angle increment can be accurately calculated, ensuring the accuracy of the eccentric angle calculation. Moreover, there is no need to determine the interpolation endpoint. The interpolation point calculation obtained by this application has high accuracy and is simple.

[0107] Please see Figure 6 , Figure 6 This is a schematic diagram of an elliptical arc trajectory simulation provided in an embodiment of this application. The diagram shows the simulated trajectory of the semi-major axis circular arc and the elliptical arc. Figure 6 ZhongX pOSITION and Y pOSITION Indicates the coordinate axes. See also Figure 7 , Figure 7 This is a simulation diagram of a circular arc velocity curve provided in an embodiment of this application. In the figure, the vertical axis v represents the linear velocity, v x v represents the component of linear velocity in the X-axis direction. y The x-axis represents the linear velocity component along the Y-axis, and the x-axis period represents time.

[0108] To verify the feasibility and practicality of this elliptic interpolation method, the standard equation of an ellipse was used. For example, given the starting coordinates of the elliptical interpolation as S(4,0), the ending coordinates as E(-4,0), the center coordinates as (0,0), and the interpolation direction as counterclockwise, the simulation shows that the semi-major axis arc and the elliptical arc are as follows: Figure 6 As shown. The acceleration / deceleration curve of the circular arc is as follows. Figure 7 As shown.

[0109] To further verify the interpolation coordinates of the elliptical arc, this embodiment can input the coordinates of each interpolation point of the elliptical arc into the standard equation of the ellipse, and calculate that the value is always equal to 1, such as... Figure 8 As shown, Figure 8 This is a schematic diagram illustrating the verification result of the standard equation of an elliptic arc provided in an embodiment of this application. Figure 8 The horizontal axis represents time, and the vertical axis represents... The calculation results are visible. Figure 8 In the verification results The value of is always equal to 1.

[0110] According to the properties of ellipses, the sum of the distances from any point on an ellipse to its two foci is equal to 2a, where a is the length of the semi-major axis. Calculate the sum of the coordinates of each interpolation point of the given elliptical arc to the two foci of the ellipse; the calculated value is always equal to twice the length of the semi-major axis of the ellipse. Figure 9 This is a schematic diagram illustrating the verification of the sum of distances from an elliptical arc interpolation point to the focal point, provided in an embodiment of this application. Figure 9 As shown, the elliptical interpolation method proposed in this embodiment has high accuracy in calculating interpolation points, proving the feasibility of the elliptical arc interpolation algorithm proposed in this embodiment. Figure 9 The horizontal axis represents time, and the vertical axis represents the sum of the distances from the interpolation point to the focal point. Figure 9 In the verification results, the vertical axis represents the sum of the distances from the interpolation point to the focal point, which is always 8.

[0111] Please see Figure 10 , Figure 10This is a schematic diagram of an elliptic interpolation control device provided in an embodiment of this application. The elliptic interpolation control device can be a programmable logic controller (PLC) capable of implementing high-performance real-time interpolation. The elliptic interpolation control device includes a memory 71 and a processor 72. The memory 71 stores the computer program executed by the processor 72, and the processor 72 is used to execute the computer program to implement the scheme of the above embodiment.

[0112] The control system for a CNC machine tool provided in this application includes:

[0113] The trajectory determination module is used to determine the target machining trajectory of the CNC machine tool;

[0114] An ellipse equation generation module is used to generate the ellipse equation of the target machining trajectory if the target machining trajectory is an elliptical arc.

[0115] The arc determination module is used to determine the circle equation corresponding to the ellipse equation, and to determine the arc start point and arc end point based on the endpoints of the target machining trajectory and the circle equation.

[0116] The interpolation calculation module is used to perform acceleration and deceleration planning based on the starting point and ending point of the arc, and to determine the target coordinates for each interpolation cycle based on the acceleration and deceleration planning results.

[0117] The control module is used to control the CNC machine tool to perform machining based on the target coordinates.

[0118] In this embodiment, after determining that the target machining trajectory of the CNC machine tool is an elliptical arc, the ellipse equation of the target machining trajectory is generated, and then the corresponding circle equation is generated based on the ellipse equation. This embodiment determines the starting and ending points of the circle based on the endpoints of the target machining trajectory and the circle equation, and then performs acceleration / deceleration planning based on the starting and ending points of the circle to obtain the target coordinates of the CNC machine tool in each interpolation cycle, so that machining can be performed based on these target coordinates. In this embodiment, the target coordinates for each interpolation cycle are directly calculated using the ellipse equation, ensuring that the target coordinates lie on the target machining trajectory, thus avoiding calculation errors in the elliptical arc interpolation process. Therefore, this embodiment can reduce the interpolation error of elliptical arcs and improve the machining accuracy of the CNC machine tool.

[0119] Furthermore, the process of acceleration / deceleration planning by the interpolation calculation module based on the arc start point and the arc end point includes: calculating the arc length based on the arc start point and the arc end point; performing acceleration / deceleration planning based on the arc length, the center coordinates of the circle equation, and the processing direction of the target processing trajectory to obtain the acceleration / deceleration planning result; wherein, the acceleration / deceleration planning result includes the linear velocity of each interpolation cycle.

[0120] Furthermore, the process by which the interpolation calculation module determines the target coordinates for each interpolation cycle based on the acceleration / deceleration planning results includes: calculating the circular angular velocity corresponding to each interpolation cycle based on the linear velocity of each interpolation cycle in the acceleration / deceleration planning results; calculating the eccentric angle of each interpolation cycle based on the circular angular velocity; and determining the target coordinates for each interpolation cycle based on the eccentric angle.

[0121] Furthermore, the process by which the interpolation calculation module calculates the eccentric angle of each interpolation cycle based on the arc angular velocity includes: calculating the arc angle increment of each interpolation cycle based on the arc angular velocity; and calculating the eccentric angle of each interpolation cycle based on the arc angle increment of each interpolation cycle.

[0122] Furthermore, the process by which the arc determination module determines the arc start point and arc end point based on the endpoints of the target machining trajectory and the circle equation includes: generating an auxiliary line in a preset direction through the endpoints of the target machining trajectory; wherein the preset direction is a direction perpendicular to the semi-major axis; and determining the arc start point and arc end point based on the intersection of the auxiliary line and the circle equation.

[0123] Furthermore, the process by which the arc determination module generates an auxiliary line in a preset direction through the endpoint of the target machining trajectory includes: determining the machining start point and machining end point of the target machining trajectory; generating a first auxiliary line in the preset direction through the machining start point; and generating a second auxiliary line in the preset direction through the machining end point.

[0124] Furthermore, the process by which the arc determination module determines the arc start point and the arc end point based on the intersection of the auxiliary line and the circle equation includes: determining the first intersection point of the first auxiliary line and the circle equation, and setting the first intersection point, which is in the same quadrant or on the same coordinate axis as the processing start point, as the arc start point; determining the second intersection point of the second auxiliary line and the circle equation, and setting the second intersection point, which is in the same quadrant or on the same coordinate axis as the processing end point, as the arc end point.

[0125] Furthermore, the process by which the arc determination module determines the circle equation corresponding to the ellipse equation includes: determining the endpoint line connecting the starting point and the ending point of the target machining trajectory; determining whether the projection length of the endpoint line in the preset direction is greater than the semi-minor axis length of the ellipse equation; if so, generating the circle equation with the center of the ellipse as the center and the length of the semi-major axis as the radius; if not, generating the circle equation with the center of the ellipse as the center and the length of the semi-major axis or semi-minor axis as the radius.

[0126] Since the embodiments of the system part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the system part, and they will not be repeated here.

[0127] This application also provides a storage medium on which a computer program is stored, which, when executed, can perform the steps provided in the above embodiments. The storage medium may include various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0128] This application also provides an electronic device that may include a memory and a processor. The memory stores a computer program, and when the processor calls the computer program in the memory, it can implement the steps provided in the above embodiments. Of course, the electronic device may also include various network interfaces, power supplies, and other components.

[0129] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of the claims of this application.

[0130] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

Claims

1. A control method for a CNC machine tool, characterized in that, include: Determine the target machining trajectory for the CNC machine tool; If the target machining trajectory is an elliptical arc, then the ellipse equation of the target machining trajectory is generated; Determine the circle equation corresponding to the ellipse equation, and determine the starting point and ending point of the arc based on the endpoints of the target processing trajectory and the circle equation; Acceleration and deceleration planning is performed based on the starting point and ending point of the arc, and the target coordinates for each interpolation cycle are determined based on the acceleration and deceleration planning results. The CNC machine tool is controlled to perform machining based on the target coordinates; The acceleration / deceleration planning based on the starting and ending points of the arc includes: Calculate the arc length based on the arc start point and the arc end point; Acceleration and deceleration planning is performed based on the arc length, the center coordinates of the circle equation, and the machining direction of the target machining trajectory to obtain the acceleration and deceleration planning result; wherein, the acceleration and deceleration planning result includes the linear velocity of each interpolation cycle; The step of determining the target coordinates for each interpolation cycle based on the acceleration / deceleration planning results includes: Calculate the circular angular velocity corresponding to each interpolation cycle based on the linear velocity of each interpolation cycle in the acceleration / deceleration planning results; The centrifugal angle for each interpolation cycle is calculated based on the circular angular velocity. The target coordinates for each interpolation cycle are determined based on the eccentric angle.

2. The control method for a CNC machine tool according to claim 1, characterized in that, Calculating the centrifugal angle for each interpolation cycle based on the circular angular velocity includes: The arc angle increment for each interpolation cycle is calculated based on the arc angular velocity. The centrifugal angle of each interpolation cycle is calculated based on the arc angle increment of each interpolation cycle.

3. The control method for a CNC machine tool according to claim 1, characterized in that, The step of determining the starting point and ending point of the arc based on the endpoints of the target machining trajectory and the circle equation includes: An auxiliary line in a preset direction is generated through the endpoint of the target processing trajectory; wherein, the preset direction is the direction perpendicular to the semi-major axis of the ellipse equation; The starting point and ending point of the arc are determined based on the intersection of the auxiliary line and the circle equation.

4. The control method for a CNC machine tool according to claim 3, characterized in that, The process involves generating an auxiliary line in a preset direction after passing through the endpoint of the target processing trajectory, including: Determine the starting point and ending point of the target machining trajectory; A first auxiliary line in the preset direction is generated through the processing starting point; A second auxiliary line in the preset direction is generated after the processing endpoint.

5. The control method for a CNC machine tool according to claim 4, characterized in that, Determining the starting point and ending point of the arc based on the intersection of the auxiliary line and the circle equation includes: Determine the first intersection point between the first auxiliary line and the circle equation, and set the first intersection point that is in the same quadrant or on the same coordinate axis as the processing starting point as the arc starting point; Determine the second intersection point between the second auxiliary line and the circle equation, and set the second intersection point, which is in the same quadrant or on the same coordinate axis as the machining endpoint, as the endpoint of the arc.

6. The control method for a CNC machine tool according to any one of claims 1 to 5, characterized in that, Determining the equation of the circle corresponding to the equation of the ellipse includes: Determine the endpoint line connecting the starting point and the ending point of the target processing trajectory; Determine whether the projected length of the line connecting the endpoints in a preset direction is greater than the length of the semi-minor axis of the ellipse equation; wherein, the preset direction is the direction perpendicular to the semi-major axis of the ellipse equation; If so, then the circle equation is generated with the center of the ellipse in the ellipse equation as the center and the length of the semi-major axis of the ellipse equation as the radius; If not, then the circle equation is generated with the center of the ellipse in the ellipse equation as the center and the length of the semi-major axis or semi-minor axis of the ellipse equation as the radius.

7. A control system for a CNC machine tool, characterized in that, include: The trajectory determination module is used to determine the target machining trajectory of the CNC machine tool; An ellipse equation generation module is used to generate the ellipse equation of the target machining trajectory if the target machining trajectory is an elliptical arc. The arc determination module is used to determine the circle equation corresponding to the ellipse equation, and to determine the arc start point and arc end point based on the endpoints of the target machining trajectory and the circle equation. The interpolation calculation module is used to perform acceleration and deceleration planning based on the starting point and ending point of the arc, and to determine the target coordinates for each interpolation cycle based on the acceleration and deceleration planning results. The control module is used to control the CNC machine tool to perform machining based on the target coordinates; The interpolation calculation module performs acceleration / deceleration planning based on the arc start point and the arc end point, including: calculating the arc length based on the arc start point and the arc end point; performing acceleration / deceleration planning based on the arc length, the center coordinates of the circle equation, and the processing direction of the target processing trajectory to obtain the acceleration / deceleration planning result; wherein, the acceleration / deceleration planning result includes the linear velocity of each interpolation cycle; The process by which the interpolation calculation module determines the target coordinates for each interpolation cycle based on the acceleration / deceleration planning results includes: calculating the circular angular velocity corresponding to each interpolation cycle based on the linear velocity of each interpolation cycle in the acceleration / deceleration planning results; calculating the eccentric angle of each interpolation cycle based on the circular angular velocity; and determining the target coordinates for each interpolation cycle based on the eccentric angle.

8. An electronic device, characterized in that, The system includes a memory and a processor, wherein the memory stores a computer program, and the processor, when calling the computer program in the memory, implements the steps of the control method for the CNC machine tool as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Elliptic arc interpolation method

    CN102147599A

  • Ellipse interpolation control method by an NC-device

    US5189627A