Workpiece machining control method, electronic equipment and storage medium

By generating closed spline curves and calculating target angles and grinding wheel coordinates, the defects of workpiece processing on different machine tools are solved, and efficient and precise processing on the same machine tool is achieved, which improves production efficiency and reduces costs.

CN120508037APending Publication Date: 2025-08-19BEIJING A&E TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510668993.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-22
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

The existing workpiece processing methods need to be processed separately on different machine tools, resulting in defects such as large positioning errors, low processing efficiency, large equipment investment, large factory investment, and long adjustment time.

Method used

By generating a closed spline curve based on the outer contour information of the workpiece to be processed, the target angle and grinding wheel processing coordinates of the point to be processed are calculated using the target grinding wheel radius, initial coordinates and eccentric distance, and target control information is generated to complete the processing of different parts on the same machine tool.

Benefits of technology

It improves the production efficiency and quality of workpiece processing, reduces the cost of workpiece processing, and realizes accurate processing of different parts on the same machine tool.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120508037A_ABST
    Figure CN120508037A_ABST
Patent Text Reader

Abstract

The invention discloses a workpiece machining control method, electronic equipment and a storage medium, and the method comprises the steps: obtaining a closed spline curve based on the outer contour information of a to-be-machined workpiece; based on the target grinding wheel radius of the target grinding wheel, the initial coordinates of the to-be-machined point on the closed spline curve and the eccentric distance from the to-be-machined workpiece to the rotation center of the main journal, the target angle of the to-be-machined point during machining and the grinding wheel machining coordinates of the target grinding wheel are determined; and target control information used for machining the to-be-machined workpiece is obtained through the target angle of rotation of the main journal and the machining coordinates of the grinding wheel when the to-be-machined point on the closed spline curve is machined. According to the scheme, the production efficiency and quality of workpiece machining can be improved, and the workpiece machining cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of numerical control machining, and in particular to a workpiece machining control method, electronic equipment, and storage medium. Background Art

[0002] Workpiece machining control is a crucial aspect of CNC machining. Currently, existing methods often require different parts of the workpiece to be machined on separate machine tools. For example, traditional crankshaft grinding involves two separate grinding processes, grinding the main journal and connecting rod necks separately. Because this method requires secondary positioning, it suffers from large positioning errors, low machining efficiency, high equipment and plant investment, and lengthy adjustment times. Summary of the Invention

[0003] The present application at least provides a workpiece processing control method, electronic equipment, and storage medium, which can improve the production efficiency and quality of workpiece processing and reduce the cost of workpiece processing.

[0004] The first aspect of the present application provides a workpiece processing control method, the method comprising: obtaining a closed spline curve based on the outer contour information of the workpiece to be processed, wherein the starting point and the ending point of the closed spline curve are continuous, and the closed spline curve is obtained by discretizing and reorganizing the outer contour information; determining the target angle of rotation of the main shaft neck and the grinding wheel processing coordinates of the target grinding wheel when processing the processing point based on the target grinding wheel radius of the target grinding wheel, the initial coordinates of the point to be processed on the closed spline curve, and the eccentric distance from the workpiece to be processed to the main shaft neck rotation center, and determining the target angle of rotation of the main shaft neck and the grinding wheel processing coordinates of the target grinding wheel when processing the point to be processed; and performing conversion processing using the target angle and the grinding wheel processing coordinates when processing the point to be processed on the closed spline curve to obtain target control information for processing the workpiece to be processed.

[0005] Among them, based on the target grinding wheel radius of the target grinding wheel, the initial coordinates of the point to be processed on the closed spline curve and the eccentric distance from the workpiece to be processed to the main shaft neck rotation center, the target angle of the main shaft neck rotation and the grinding wheel processing coordinates of the target grinding wheel when processing the point to be processed are determined, including: using the target grinding wheel radius, the initial coordinates of the point to be processed and the tangent vector on the closed spline curve and the eccentric distance from the workpiece to be processed to the main shaft neck rotation center to determine the reference coordinates of the reference point, wherein the connecting line segment between the reference point and the point to be processed is perpendicular to the tangent vector of the point to be processed, and the connecting line segment has the same length as the target grinding wheel radius; based on the reference coordinates of the reference point, the target angle of the main shaft neck rotation and the grinding wheel processing coordinates of the target grinding wheel when processing the point to be processed are obtained.

[0006] The reference coordinates of the reference point are determined using the target grinding wheel radius, the initial coordinates of the point to be machined, the tangent vector on the closed spline curve, and the eccentric distance from the workpiece to be machined to the rotation center of the main spindle neck, including:

[0007] x`-x=r q +(-r s ·v y );

[0008] y`-y=r s ·v x ;

[0009] The coordinates of the reference point are: (r q +xr s ·v y , y+r s ·v x );

[0010] Among them, the initial coordinates of the point to be processed are (x, y), (v x , v y ) is the tangent vector of the point to be processed, and the first vector that is orthogonal to the tangent vector and opposite to the direction of rotation is (-v y , v x ), the second vector with the same direction as the first vector and the modulus of the target grinding wheel radius is (-r s ·v y , r s ·v x ), r s is the target grinding wheel radius, r q is the eccentric distance.

[0011] Among them, based on the reference coordinates of the reference point, the target angle of the main shaft neck rotation when processing the point to be processed and the grinding wheel processing coordinates of the target grinding wheel are obtained, including: using the reference coordinates of the reference point to determine the reference distance from the reference point to the rotation center, wherein the distance from the grinding wheel processing coordinates of the target grinding wheel to the rotation center is the same as the reference distance; the angle formed by the reference coordinates of the reference point and the grinding wheel processing coordinates of the target grinding wheel and the line connecting the rotation center is used as the target angle.

[0012] The closed spline curve is obtained based on the outer contour information of the workpiece to be processed, including: discretizing the outer contour information of the workpiece to be processed to obtain a number of discrete nodes; and reconstructing the discrete nodes based on the order of the target curve to obtain the closed spline curve.

[0013] The method of reconstructing the discrete nodes based on the target curve order to obtain a closed spline curve includes: performing calculation based on the first control vector set, the first node vector set and the target curve order to obtain a closed spline curve; wherein, the first control vector set is CtrlPts=[P n-p+1 ,…,P n , P1,…,P n ], the first node vector set is P n is a discrete node, p is the order of the target curve, and n is the number of discrete nodes.

[0014] Among them, the target control information at least includes a rotation control curve, and the target angle of the main shaft neck rotation corresponding to the processing of the to-be-processed point on the closed spline curve and the grinding wheel processing seat of the target grinding wheel are used for conversion processing to obtain the target control information for processing the workpiece to be processed, including: normalizing the target angles corresponding to each to-be-processed point to obtain an angle vector set, wherein the angle vector set includes the normalized angle nodes corresponding to each target angle; averaging the angle vector set to obtain a second node vector set, wherein the second node vector set is a set of nodes in the rotation control curve; all to-be-processed points on the closed spline curve are used as control points in the rotation control curve to obtain the second control vector set; and calculating using the second node vector set, the second control vector set and the order of the target curve to obtain the rotation control curve.

[0015] The angle vector set is averaged to obtain a second node vector set, including:

[0016] u0=…=u p =0;

[0017] u m-p =…=u m =1;

[0018]

[0019] knots'=(0,…,0,u1,…,u n , 1,…, 1);

[0020] Where knots' is the second knot vector set, p is the target curve order, u0, ..., u p represents the first number of nodes in the second node vector set, u m-p ,…,u m Represents the second number of nodes in the second node vector set.

[0021] Among them, when the position of the to-be-processed point is a main journal on the crankshaft, the eccentric distance is 0, and when the position of the to-be-processed point is a connecting rod journal on the crankshaft, the eccentric distance is not 0.

[0022] A second aspect of the present application provides an electronic device, comprising a memory and a processor coupled to each other, wherein the processor is configured to execute program instructions stored in the memory to implement the workpiece processing control method in the first aspect.

[0023] A third aspect of the present application provides a computer-readable storage medium having program instructions stored thereon, which implement the workpiece processing control method in the first aspect when the program instructions are executed by a processor.

[0024] The above scheme obtains the closed spline curve corresponding to the workpiece to be processed through the outer contour information of the workpiece to be processed, and uses the initial coordinates of the to-be-processed point on the closed spline curve, the target grinding wheel radius of the target grinding wheel, and the eccentric distance from the position where the to-be-processed point is rotated to the rotation center for calculation to obtain the target angle required to rotate when processing the to-be-processed point and the grinding wheel processing coordinates of the target grinding wheel. Then, the target angle and grinding wheel processing coordinates corresponding to the to-be-processed point on the closed spline curve are used to obtain target control information for processing the workpiece to be processed. The target angle and grinding wheel processing coordinates are obtained based on the eccentric distance, and the target control information is obtained based on the target angle and grinding wheel processing coordinates. In actual processing, different eccentric distances can control the workpiece to be processed to move and rotate accordingly according to the target control information, and at the same time control the target grinding wheel to move toward the workpiece to be processed, so that different processing methods and different parts of the workpiece to be processed can be processed on the same machine tool, thereby improving the production efficiency and quality of workpiece processing and reducing the workpiece processing cost.

[0025] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The drawings herein are incorporated into and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and, together with the specification, are used to illustrate the technical solutions of the present application.

[0027] Figure 1 This is a flow chart of an embodiment of the workpiece processing control method of the present application;

[0028] Figure 2 This is a working condition diagram of an embodiment of the present application where a workpiece to be machined is on a main journal;

[0029] Figure 3 This is a working condition diagram of an embodiment of the present application where a workpiece to be machined is on a connecting rod neck;

[0030] Figure 4 This is a flow chart of another embodiment of the workpiece processing control method of the present application;

[0031] Figure 5 This is a schematic diagram of the framework of an embodiment of the electronic device of the present application;

[0032] Figure 6 It is a schematic diagram of a framework of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION

[0033] The following describes the embodiments of the present application in detail with reference to the accompanying drawings.

[0034] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.

[0035] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the previous and next associated objects are in an "or" relationship. In addition, "many" in this article means two or more than two. In addition, the term "at least one" in this article means any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C, can mean including any one or more elements selected from the set consisting of A, B, and C.

[0036] See also Figure 1 , Figure 1 This is a flow chart of the workpiece processing control method of the present application. Specifically, it can include the following steps:

[0037] Step S110: obtaining a closed spline curve based on the outer contour information of the workpiece to be processed.

[0038] The starting point and the ending point of the closed spline curve are continuous, and the closed spline curve is obtained by discretizing and reorganizing the external contour information.

[0039] The workpiece processing control method in this application is mainly used in high-precision processing equipment such as grinding machines. It overcomes the defects of traditional crankshaft grinding, such as large workpiece positioning error, low processing efficiency, large equipment investment, large plant investment, and long adjustment time, effectively improving product quality and production efficiency, and reducing workpiece processing costs. In addition, in this application, processing software is used to simulate the situation where the target grinding wheel processes each processing point on the workpiece to be processed, so as to obtain target control information for processing the workpiece to be processed, so that in the actual processing process, the target control information can be used to quickly know the moving position of the target grinding wheel and the rotation angle of the workpiece to be processed, so as to achieve precise processing of the workpiece to be processed.

[0040] In some embodiments, the outer contour information of the workpiece to be processed can be derived by parsing a DXF (Drawing Exchange Format) file of the workpiece to be processed. The outer contour information may include one or more of a straight line segment, a circular arc, an elliptical arc, and a spline curve. However, the curve read from the outer contour information may not necessarily be continuous, and the start and end points of the read curve may also have cusps (such as the vertices of a triangle or hexagon, etc.). Therefore, it is necessary to discretize the points on the read curve and then reorganize all the discretized points so that the reorganized closed spline curve is differentiable at all locations.

[0041] In addition, the outer contour information of the workpiece to be processed may also be acquired by using 3D (3 Dimensions) scanning or other methods, which are not specifically limited here.

[0042] Therefore, the method for processing the curve read from the outer contour information may refer to steps S111 to S112 .

[0043] Step S111: discretize the outer contour information of the workpiece to be processed to obtain a number of discrete nodes.

[0044] In some embodiments, the outer contour information of the workpiece to be processed can be analyzed to obtain curve information corresponding to the workpiece to be processed, and the obtained curve information can be divided according to a predetermined segmentation method. For example, the obtained curve information can be divided into line segments of a preset length or the obtained curve information can be broken up into multiple points to obtain several discrete nodes.

[0045] Furthermore, to reduce the difficulty of subsequent recombination, the obtained discrete nodes can be screened to reduce the number of discrete nodes used during recombination. For example, if some of the continuous discrete nodes are nodes on a straight line, the discrete nodes corresponding to the ends of the line can be retained during screening. For another example, if some of the continuous discrete nodes are points on a curve with significant curvature, in addition to retaining the discrete nodes corresponding to the ends of the curve, the discrete nodes corresponding to the most abrupt nodes on the curve can also be retained.

[0046] In some embodiments, a mathematical model may be used to screen the obtained discrete nodes. For example, a mathematical model may be used to extract features from the discrete nodes to obtain node features corresponding to the discrete nodes. The node features are then screened to retain node features that meet preset feature requirements, thereby retaining the corresponding discrete nodes.

[0047] Step S112: reconstructing the discrete nodes based on the target curve order to obtain a closed spline curve.

[0048] In some embodiments, after obtaining discrete nodes, the discrete nodes are reordered using the target curve order to obtain the control points of the spline curve. The target curve order and the number of discrete nodes are used to obtain the nodes of the spline curve. A closed spline curve can be determined using the control points, nodes, and target curve order. For details, see steps S1121 to S1123.

[0049] Step S1121: Using the target curve order to perform closed recombination on discrete nodes to obtain a first control vector set.

[0050] The first control vector set is a set of control points in the closed spline curve, and the target curve order is the order of the closed spline curve, which can be set by the operation object or use a default value.

[0051] In some embodiments, to prevent the rotation angle of the workpiece to be processed from exceeding 360° during the processing, the discrete nodes can be closed and reorganized using the target curve order so that the obtained first control vector set is a cyclic and closed set. The specific formula is as follows:

[0052] CtrlPts=[P n-p+1 ,…,P n , P1,…,P n ] (1)

[0053] Among them, CtrlPts represents the first control vector set, P n is a discrete node, p is the order of the target curve, and n is the number of discrete nodes.

[0054] For example, when the number n of discrete nodes obtained is 9 and the target curve order p is 4, the first control vector set can be CtrlPts = [P6, P7, P8, P9, P1, P2, P3, P4P5, P6, P7, P8, P9].

[0055] Step S1122: Determine a first node vector set of the closed spline curve based on the number of discrete nodes and the target curve order.

[0056] The first node vector set is a set of nodes in the closed spline curve.

[0057] In some embodiments, the initial range of nodes can be determined using the number of discrete nodes and the target curve order. The first node vector set is then obtained using the ratio of the initial range of nodes to the number of discrete nodes. The initial range of nodes is from the negative target curve order to the sum of the number of discrete nodes and the target curve order. Specifically, the following formula can be used:

[0058] knots=(-p:n+p) / n(2)

[0059] Wherein, knots represents the first node vector set.

[0060] For example, when the number n of discrete nodes is 9 and the target curve order p is 4, the first node vector set may be knots=(-4, -3, -2, -1, 0, 1, ... 9, 10, 11, 12, 13) / 9.

[0061] In one implementation scenario, steps S1121 and S1122 may be performed in a sequential order, for example, step S1121 may be performed first, followed by step S1122; or step S1122 may be performed first, followed by step S1121. In another implementation scenario, steps S1121 and S1122 may be performed simultaneously, and the specific configuration may be based on actual applications and is not specifically limited herein.

[0062] Step S1123: performing calculation based on the first control vector set, the first node vector set and the target curve order to obtain a closed spline curve.

[0063] In some embodiments, the closed spline curve may be a p-order NURBS (Non uniform rational B-spline) curve, and the p-order NURBS curve is composed of a node vector U={u0, u1, u2, ..., u n+p+1}, control point vector Weight vector W = {w0, w1, ..., w nTherefore, in this embodiment, the weight vectors can be set to 1, and the first control vector set CtrlPts is the control point vector in the p-order NURBS curve. The first knot vector set, knots, represents the knot vectors U in the p-th degree NURBS curve. The target curve's order is the p-th degree of the NURBS curve. Therefore, knowing the first control vector set, the first knot vector set, and the target curve's order allows us to determine the specific formula for the p-th degree NURBS curve. The steps for determining the specific formula for the p-th degree NURBS curve are well-known and will not be detailed here.

[0064] It is understandable that the closed spline curve may also be a B-curve, etc., which is not specifically limited here.

[0065] Step S120: Based on the target grinding wheel radius of the target grinding wheel, the initial coordinates of the to-be-machined point on the closed spline curve, and the eccentric distance from the to-be-machined workpiece to the rotation center, determine the target spindle neck rotation angle and the grinding wheel machining coordinates of the target grinding wheel when machining the to-be-machined point.

[0066] In some embodiments, the target angle of the point to be processed during processing and the grinding wheel processing coordinates of the target grinding wheel can be determined by combining the target grinding wheel radius, the initial coordinates of the point to be processed on the closed spline curve, and the eccentric distance from the workpiece to be processed to the rotation center. When the workpiece to be processed is processed by a grinding machine, the workpiece to be processed is placed on the main shaft neck in the grinding machine, and the rotation center is the main shaft neck center, and the eccentric distance is 0; or, the workpiece to be processed is placed on the connecting rod neck in the grinding machine, and the rotation center is still the neck center, then the eccentric distance is the distance from the workpiece to be processed to the main shaft neck center, that is, the length of the connecting rod neck. It is understandable that the target angle of the point to be processed during processing and the grinding wheel processing coordinates of the target grinding wheel can also be determined by combining data such as the grinding amount, the interpolation cycle, and the rotation speed of the target grinding wheel, and no specific limitation is made here.

[0067] Specifically, the target angle required to be rotated when processing the to-be-processed point and the grinding wheel processing coordinates of the target grinding wheel can be determined according to steps S1201 to S1202.

[0068] Step S1201: Determine the reference coordinates of the reference point using the target grinding wheel radius, the initial coordinates of the point to be machined, the tangent vector on the closed spline curve, and the eccentric distance from the workpiece to be machined to the rotation center of the main journal.

[0069] The connecting line segment between the reference point and the point to be processed is perpendicular to the tangent vector of the point to be processed, and the connecting line segment has the same length as the radius of the target grinding wheel.

[0070] In some embodiments, the tangent vector of the point to be processed can be set as (v x , v y), and obtain the first vector that is orthogonal to the tangent vector and opposite to the rotation direction, that is, rotate the tangent vector 90° in the direction opposite to the rotation direction to obtain the first vector (-v y , v x ). Where the tangent vector and the first vector are both unit vectors: Then, based on the target grinding wheel radius and the first vector, a second vector (-r s ·v y , r s ·v x ). Then, based on the initial coordinates of the point to be processed, the corresponding eccentric distance and the second vector, the reference coordinates of the reference point are obtained. Specifically, the difference between the coordinates of the reference point and the coordinates of the point to be processed can be used as the second vector to obtain the reference coordinates of the reference point:

[0071] X coordinate difference: x`-x=r q +(-r s ·v y ) formula (3);

[0072] Y coordinate difference: y`-y=r s ·v x Formula (4);

[0073] The coordinates of the reference point can be obtained as follows: (r q +xr s ·v y , y+r s ·v x );

[0074] Among them, r s is the target grinding wheel radius, r q is the eccentric distance.

[0075] Step S1202: Based on the reference coordinates of the reference point, a target angle of rotation of the spindle neck and a grinding wheel machining coordinate of the target grinding wheel are obtained when machining the point to be machined.

[0076] In some embodiments, a reference distance from the reference point to the rotation center is determined using the reference coordinates of the reference point, wherein the distance from the grinding wheel processing coordinates of the target grinding wheel to the rotation center is the same as the reference distance. The target angle is then determined based on the angle formed by the lines connecting the reference coordinates of the reference point and the grinding wheel processing coordinates of the target grinding wheel with the rotation center. The angle in this case is equivalent to the target angle.

[0077] See also Figure 2The part where the workpiece to be processed is located is the main spindle of the grinding machine, where the center of the main spindle is the origin A in the XY axis coordinate system. In order to facilitate the calculation of the grinding wheel processing coordinates of the target grinding wheel, the target grinding wheel can be set to move on the X axis. The solid closed spline curve 210 of the workpiece to be processed is the initial position of the workpiece to be processed, and the dotted line is the closed spline curve 210 after the workpiece to be processed is rotated by a certain angle during processing. The target grinding wheel radius is ED`=r s The solid target grinding wheel curve 220 is the initial position of the target grinding wheel, and the dotted line is the position of the target grinding wheel when grinding the to-be-machined point C on the workpiece. When the solid closed spline curve 210 rotates to the dotted line position, the solid target grinding wheel curve 220 also advances to the corresponding dotted line position, so that the target grinding wheel curve 220 is just tangent to the to-be-machined point E on the closed spline curve 210. At this time, the target angle of rotation of the main shaft neck when machining the to-be-machined point can be equivalent to the angle formed by the line segment AC and the line segment AE. However, the position of the point E after rotation is unknown, and calculating the position of the point E is relatively complicated. Therefore, a conversion can be performed to reconstruct a triangle ABC in the XY axis coordinate system that is congruent with the triangle AED`.

[0078] The construction process of triangle ABC is as follows: First, obtain the tangent vector CG (v x , v y ), and then obtain the second vector CB (-r s ·v y ,r s ·v x ). The corresponding eccentric distance is 0. The initial coordinates of the processing point C are (x, y). According to the above formulas 3 and 4, the reference coordinates of the reference point B (xr s ·v y , y+r s ·v x ), so that the reference distance from reference point B to rotation center A can be known The distance from the target grinding wheel center D' to the rotation center A is equal to the reference distance, and the target grinding wheel is located on the X-axis, so the grinding wheel processing coordinates of the target grinding wheel are It can also be known that the target angle is the rotation angle from line segment AB to line segment AD':

[0079] In y+r s ·v x <0,

[0080] In y+r s ·v x ≥0,

[0081] Where θ is the target angle.

[0082] When the workpiece to be machined is arranged on a main journal on a crankshaft, the eccentric distance is 0; when the workpiece to be machined is arranged on a connecting rod journal on a crankshaft, the eccentric distance is not 0.

[0083] See also Figure 3 The workpiece to be machined is placed on the connecting rod neck in the grinding machine, where the center of the main journal is point A, and the contact points between the workpiece to be machined and the connecting rod neck are points M and N. Similar to the above method, to obtain the target angle formed by line segment AM to line segment AN, two congruent quadrilaterals ANED` and AMCB can be constructed. First, obtain the tangent vector CG (v x , v y ), and then obtain the second vector CB (-v y ,v x ). Among them, the corresponding eccentric distance is AM=AN=r q The initial coordinates of the processing point C are (x, y). According to the above formulas 3 and 4, the reference coordinates of the reference point B can be obtained (r q +xr s ·v y , y+r s ·v x ), so that the reference distance from reference point B to rotation center A can be known The distance from the target grinding wheel center D' to the rotation center A is equal to the reference distance, and the target grinding wheel is located on the X-axis, so the grinding wheel processing coordinates of the target grinding wheel are The target angle can be expressed by the rotation angle from line segment AB to line segment AD`:

[0084] In y+r s ·v x <0,

[0085] In y+r s ·v x ≥0,

[0086] In this way, the workpiece to be machined can be machined whether it is on the main journal or the connecting rod journal.

[0087] Step S130: converting the target angle of the point to be processed on the closed spline curve and the grinding wheel processing coordinates to obtain target control information for processing the workpiece to be processed.

[0088] In some embodiments, the target angle of the main shaft neck rotation when processing the point to be processed on the closed spline curve and the grinding wheel processing coordinates of the target grinding wheel can be mapped one by one to obtain a mapping relationship between the target angle and the grinding wheel processing coordinates, and the mapping relationship can be used as target control information for processing the workpiece to be processed.

[0089] In other embodiments, the target control information may include at least a rotation control curve. Thus, the rotation control curve can be obtained using the target angle and grinding wheel machining coordinates of the machining point on the closed spline curve. Specifically, the rotation control curve can be a NURBS curve. Therefore, the method for obtaining the NURBS curve can be described in steps S1301 to S1304.

[0090] Step S1301: normalize the target angles corresponding to the points to be processed to obtain an angle vector set.

[0091] The angle vector set includes normalized angle nodes corresponding to each target angle.

[0092] In some embodiments, for any point to be processed on a closed spline curve, a corresponding target angle of rotation of the main shaft neck and the grinding wheel processing coordinates of the target grinding wheel can be found. When processing the workpiece to be processed, in order to avoid the reciprocating swing of the main shaft neck or the connecting rod neck causing the equipment to shake, a set of angles {θ k}, k=1, 2, 3,..., n, θ k ∈[0, 2π], the target angles in the angle set need to be monotonically increasing, and the points to be processed on the closed spline curve must be distributed in a clockwise direction. Therefore, after obtaining the angle set, it is necessary to check whether the target angles contained therein are monotonically increasing. In addition, when machining the crankshaft of a grinder, the initial angle of the main journal is not necessarily 0. In this case, it is necessary to add 2π to all angles whose target angles are less than θ1, so that θ k ∈[θ1,θ1+2π]. Finally, all angles need to be mapped to To get the angle vector set. For example, θ k ∈[θ1,θ1+2π] divided by 2π, then subtracted So that θ k Mapped to the interval [0, 1].

[0093] Step S1302: performing averaging processing on the angle vector set to obtain a second node vector set.

[0094] The second node vector set is a set of nodes in the rotation control curve.

[0095] In some embodiments, the parameters corresponding to the first number of nodes in the second node vector set can be set to 0, and the parameters corresponding to the second number of nodes can be set to 1, where the first number and the second number are both equal to the sum of the target curve order and 1. Then, the angle nodes from the first to the second number in the angle vector set are summed to obtain the angle sum. The ratio between the angle sum and the target curve order is used to obtain the parameters of the node with the third number in the middle of the second node vector set. The third number is the sum of the first number and the target curve order, and the second number is the difference between the third number and 1. The specific formula is as follows:

[0096] u0=…=u p =0;

[0097] u m-p =…=u m =1;

[0098]

[0099] knots'=(0,…,0,u1,…,u n , 1,…, 1) (6)

[0100] Among them, knots' is the second node vector set, u0,...,u p represents the first number of nodes in the second node vector set, u m-p ,…,u m Represents the next second number of nodes in the second node vector set.

[0101] Step S1303: All the points to be processed on the closed spline curve are used as control points in the rotation control curve to obtain a second control vector set.

[0102] In some embodiments, all the points to be processed on the closed spline curve are {P i}, i = 1, 2, 3, ..., n, so that all the points to be processed on the closed spline curve are used as control points in the rotation control curve to obtain the second control vector set:

[0103] CtrlPts'=[P1,…,P n ] (7)

[0104] Step S1304: performing calculations using the second node vector set, the second control vector set, and the target curve order to obtain a rotation control curve.

[0105] In some embodiments, after obtaining the second node vector set, the second control vector set, and the target curve order, the weight of the rotation control curve is set to 1, and a specific formula of the rotation control curve can be obtained.

[0106] After step S1304, motion control planning for crankshaft grinding can be performed based on the rotation control curve. For example, in the case of constant speed grinding of the main journal or connecting rod neck, the rotation control curve can be represented by the parameter C(u) after parameterization, and its domain is u∈[0,1]. The parameter u=0 represents the starting point of the rotation control curve, and also represents the initial angle of the main journal rotation angle. u=1 represents the end point of the rotation control curve, and also represents the end of the main journal rotation angle. Under absolute precision control, the starting speed and the end speed of the rotation control curve should ideally be 0. Since a rotation control curve with the main journal rotation angle as the node vector has been constructed, if the workpiece to be processed needs to rotate 300 times (5 minutes) at a speed of 60 rpm (1 rev / s), we can calculate the seven time periods of the rotation angle acceleration start-acceleration start-deceleration start-constant speed-deceleration stop-deceleration stop-stop stage:

[0107]

[0108] t(3)=t(1);

[0109]

[0110] t(7)=t(6);

[0111]

[0112] s2 = L - s1 - s3;

[0113]

[0114] Among them, v start and v end is 0, v max =1 (1 rev / s), W represents the maximum acceleration of rotation, V represents the maximum jerk, L=300 represents how many turns are needed to complete the processing, and finally this time is used as the basis to achieve constant speed operation of the crankshaft main journal.

[0115] For another example, in the case of constant linear speed grinding of the workpiece to be processed, the constant linear speed operation represents that the rotation speed of the crankshaft main journal needs to be calculated based on the linear speed of the surface of the workpiece to be processed, that is, based on the linear speed set by the parameters, the rotation angle of the main journal in the next period T+1 interpolation period is predicted at the interpolation point of period T and the current rotation angle of the main journal. Since a rotation control curve with the main journal rotation angle as the node vector has been constructed, if the circumference of the outer contour of the workpiece to be processed is 100mm, it is necessary to grind the workpiece to be processed for 300 turns (5 minutes) at a speed of 6000mm / min (100mm / s), then the seven time periods of the entire acceleration start-acceleration start-deceleration start-uniform speed-deceleration stop-deceleration stop-stop stage can be calculated (similar to the above formula). In the calculation formula, v start and v end is 0, v max =100mm / s, A represents the maximum acceleration of rotation, J represents the maximum jerk, L=30000 represents how many turns are needed to complete the processing, and finally this time is used as the basis to achieve constant linear speed operation of the workpiece.

[0116] delta_s=segment_s(i);

[0117] dv=nurbs_curve_vel(knots',CtrlPts',u(i));

[0118] da=nurbs_curve_acc(knots',CtrlPts',u(i));

[0119] dtds=1 / norm(dv);

[0120] dtdsds=-dot(dv,da) / norm(dv)^4;

[0121] u(i+1)=u(i)+dtds*delta_s+0.5*dtdsds*delta_s^2;

[0122] Among them, delta_s represents distance, dv represents velocity, da represents acceleration, dtds represents the first derivative of the node with respect to length, and dtdsds represents the second derivative of the node with respect to length.

[0123] Based on the first-order derivative (speed) and second-order derivative (acceleration) of the NURBS curve in the current interpolation cycle, as well as the distance required to move in the current cycle, the u(i+1) required for the next interpolation cycle can be inversely calculated. Then, by mapping u(i+1) to a specific angle, constant linear velocity operation of the workpiece to be processed can be achieved.

[0124] See also Figure 4 , Figure 4 It is a flow chart of another embodiment of the workpiece processing control method of the present application. First, set the grinding type, target grinding wheel size, and eccentric distance from the connecting rod neck to the main shaft neck in the control page of the motion control planning software. After the settings are completed, open the DXF or IGS (Initial Graphics Exchange Specification) file of the workpiece to be processed, and determine whether the file can be read. If it cannot be read, an error report is sent; if it can be read, the outer contour information of the workpiece to be processed is read from the acquired file. And according to the acquired outer contour information of the workpiece to be processed, it is discretized and reorganized to obtain a closed spline curve. The specific steps can be referred to the above steps S1121 to S1123, which will not be repeated here.

[0125] After obtaining the closed spline curve, the target angle of rotation of the main shaft neck and the grinding wheel processing coordinates of the target grinding wheel when processing the point to be processed are determined according to the set target grinding wheel size, the initial coordinates of the point to be processed on the closed spline curve and the set eccentric distance. The specific steps can be found in steps S1201 to S1202 and will not be repeated here.

[0126] The target angle is then normalized and combined with the grinding wheel machining coordinates to generate a rotation control curve for machining the workpiece. The specific steps are described in S1301 to S1304 and are not detailed here. This results in a motion control plan for crankshaft grinding, and the corresponding machining code is exported to the CNC machine tool for actual machining.

[0127] This application plans the motion trajectory within a single grinding circle (acceleration-constant speed-deceleration) based on the target grinding wheel radius and the outer contour information of the workpiece to be processed received by the grinding software, calculates the rotation angle of the workpiece to be processed around the main shaft neck or connecting rod neck in each interpolation cycle, and the position and speed of the target grinding wheel to achieve precise processing of the workpiece to be processed.

[0128] In addition, in the present application, the workpieces to be processed on the main journal and connecting rod journal can be ground on the same CNC machine tool according to the target control information, without having to grind the main journal and connecting rod journal separately in two processes on two different CNC machine tools. The grinding of the main journal and connecting rod journal of the crankshaft can be completed in one clamping, which overcomes the defects in traditional crankshaft grinding, effectively improves product quality and production efficiency, and reduces workpiece processing costs.

[0129] Those skilled in the art will understand that in the above-mentioned method of the specific implementation method, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0130] See also Figure 5 , Figure 5 1 is a schematic diagram of an embodiment of an electronic device 50 of the present application. The electronic device 50 includes a memory 51 and a processor 52 coupled to each other. The processor 52 is configured to execute program instructions stored in the memory 51 to implement the steps of any of the aforementioned workpiece machining control method embodiments. In a specific implementation scenario, the electronic device 50 may include, but is not limited to, a microcomputer and a server. Furthermore, the electronic device 50 may also include mobile devices such as laptops and tablet computers, without limitation herein.

[0131] Specifically, the processor 52 is used to control itself and the memory 51 to implement the steps in any of the above-mentioned workpiece processing control method embodiments. The processor 52 can also be called a CPU (Central Processing Unit). The processor 52 may be an integrated circuit chip with signal processing capabilities. The processor 52 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 52 can be implemented by an integrated circuit chip.

[0132] See also Figure 6 , Figure 6 Schematic diagram of a computer-readable storage medium 60 according to an embodiment of the present invention. The computer-readable storage medium 60 stores program instructions 601 that can be executed by a processor, and the program instructions 601 are used to implement the steps of any of the above-mentioned workpiece machining control method embodiments.

[0133] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiment. Its specific implementation can refer to the description of the above method embodiment. For the sake of brevity, it will not be repeated here.

[0134] The above description of the various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced with each other and will not be repeated herein for the sake of brevity.

[0135] In the several embodiments provided in this application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation methods described above are only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0136] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0137] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

Claims

1. A workpiece processing control method, characterized in that: include: Based on the outer contour information of the workpiece to be processed, a closed spline curve is obtained, wherein the starting point and the ending point of the closed spline curve are continuous, and the closed spline curve is obtained by discretizing and recombining the outer contour information; Determining a target angle of rotation of the spindle neck when machining the point to be machined and a grinding wheel machining coordinate of the target grinding wheel based on a target grinding wheel radius of the target grinding wheel, an initial coordinate of a point to be machined on the closed spline curve, and an eccentric distance between the workpiece to be machined and the rotation center of the spindle neck; The target angle when processing the to-be-processed point on the closed spline curve and the grinding wheel processing coordinates are used to perform conversion processing to obtain target control information for processing the to-be-processed workpiece.

2. The method according to claim 1, characterized in that The method of determining a target rotation angle of the spindle neck and a grinding wheel machining coordinate of the target grinding wheel when machining the point to be machined based on a target grinding wheel radius of the target grinding wheel, an initial coordinate of a point to be machined on the closed spline curve, and an eccentric distance between the workpiece to be machined and the rotation center of the spindle neck comprises: Determining the reference coordinates of a reference point using the target grinding wheel radius, the initial coordinates of the point to be machined, the tangent vector on the closed spline curve, and the eccentric distance between the workpiece to be machined and the rotation center of the main journal, wherein a connecting line segment between the reference point and the point to be machined is perpendicular to the tangent vector of the point to be machined, and the connecting line segment has the same length as the target grinding wheel radius; Based on the reference coordinates of the reference point, the target angle of rotation of the main shaft journal when machining the to-be-machined point and the grinding wheel machining coordinates of the target grinding wheel are obtained.

3. The method according to claim 2, characterized in that The method of determining the reference coordinates of the reference point by using the target grinding wheel radius, the initial coordinates of the point to be processed, the tangent vector on the closed spline curve, and the eccentric distance between the workpiece to be processed and the rotation center of the main journal comprises: x`-x=r q +(-r s ·v y ); y`-y=r s ·v x ; The coordinates of the reference point are: (r q +xr s ·v y ,y+r s ·v x ); Among them, the initial coordinates of the point to be processed are (x, y), (v x , v y ) is the tangent vector of the point to be processed, and the first vector orthogonal to the tangent vector and opposite to the rotation direction is (-v y , v x ), the second vector with the same direction as the first vector and the modulus of the target grinding wheel radius is (-r s ·v y , r s ·v x ), r s is the target grinding wheel radius, r q is the eccentric distance.

4. The method according to claim 2, characterized in that The method of obtaining the target angle of rotation of the spindle journal and the grinding wheel machining coordinates of the target grinding wheel when machining the to-be-machined point based on the reference coordinates of the reference point includes: Determine a reference distance from the reference point to the rotation center using the reference coordinates of the reference point, wherein the distance from the grinding wheel machining coordinates of the target grinding wheel to the rotation center is the same as the reference distance; The target angle is formed by the reference coordinates of the reference point and the grinding wheel machining coordinates of the target grinding wheel and the line connecting the rotation center.

5. The method according to claim 1, wherein The method of obtaining a closed spline curve based on the outer contour information of the TT part to be added includes: Discretize the outer contour information of the to-be-added TT part to obtain a plurality of discrete nodes; The discrete nodes are reconstructed based on the target curve order to obtain the closed spline curve.

6. The method according to claim 5, characterized in that The step of reconstructing the discrete nodes based on the target curve order to obtain the closed spline curve includes: Calculating based on the first control vector set, the first node vector set and the target curve order to obtain the closed spline curve; The first control vector set is CtrlPts=[P n-p+1 ,…,P n , P1,…,P n ], the first node vector set is P n is a discrete node, p is the order of the target curve, and n is the number of discrete nodes.

7. The method according to claim 1, characterized in that The target control information at least includes a rotation control curve, and the target angle when processing the to-be-processed point on the closed spline curve and the grinding wheel processing coordinate are converted to obtain the target control information for processing the to-be-processed workpiece, including: Normalizing the target angles corresponding to the points to be processed to obtain an angle vector set, wherein the angle vector set includes the normalized angle nodes corresponding to the target angles; Performing averaging processing on the angle vector set to obtain a second node vector set, wherein the second node vector set is a set of nodes in the rotation control curve; All the to-be-processed points on the closed spline curve are used as control points in the rotation control curve to obtain a second control vector set; The rotation control curve is obtained by performing calculation using the second node vector set, the second control vector set and the target curve order.

8. The method according to claim 7, characterized in that The angle vector set is averaged to obtain a second node vector set, include: u0=…=u p =0; in m-p =…=in m =1; knots’=(0,…,0,u1,…,u n ,1,…,1); Wherein, knots' is the second knot vector set, p is the order of the target curve, u0, ..., u p represents the first number of nodes in the second node vector set, u m-p ,…,u m Represents the second number of nodes in the second node vector set.

9. The method according to any one of claims 1 to 8, characterized in that When the location of the point to be processed is the main journal on the crankshaft, the eccentric distance is 0; when the location of the point to be processed is the connecting rod journal on the crankshaft, the eccentric distance is not 0.

10. An electronic device, characterized in that: It comprises a memory and a processor coupled to each other, wherein the processor is used to execute program instructions stored in the memory to implement the workpiece processing control method according to any one of claims 1 to 9.

11. A computer-readable storage medium having program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the workpiece processing control method according to any one of claims 1 to 9 is implemented.