Motion path control method for acquiring edge track of workpiece by using automatic machine
By splitting the workpiece edge trajectory into straight line, elliptical and circular models, and using the trajectory equation and point coordinates in the two-dimensional plane to control the motion head, the error and tedious problems of automatic machines in generating workpiece edge trajectories are solved, and high-precision edge trajectory acquisition is achieved.
Patent Information
- Application Number
- CN202510765301.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-09-12
AI Technical Summary
In the prior art, when an automated machine generates a workpiece edge trajectory, the trajectory error caused by the installation error of the linear motion part is large, and the generation process is cumbersome.
By splitting the workpiece edge trajectory into straight line, ellipse and circle geometric relationship models, the trajectory equation is determined using the coordinate system in the two-dimensional plane, and the motion head is controlled to move along the workpiece edge by the point coordinates, reducing the number of splicing segments and improving the fitting accuracy.
The motion unit calibration steps are simplified, the accuracy and efficiency of edge trajectory acquisition are improved, the error is reduced, and the arc fitting effect of adapting to variable curvature is better.
Smart Images

Figure CN120630863A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of precision machining, and in particular to a motion path control method for obtaining a workpiece edge trajectory using an automated machine. Background Art
[0002] In the field of precision machining, for scenarios such as engraving, polishing, gluing or edge detection, a motion unit is required to drive the motion head on it to move along the edge of the workpiece, so as to complete tasks such as engraving, polishing, gluing or edge detection. The motion trajectory of the motion head driven by the motion unit needs to be generated by an algorithm. In the existing technology, a motion unit is formed by two orthogonal linear motion parts that are 90° apart. The motion head is installed on one of the linear motion parts, and the effect of the motion head moving along the trajectory is achieved through the mutual movement of the two orthogonal motion parts. However, during the actual installation process, it is impossible to ensure that the two linear motion parts are at a perfect 90°, which results in errors in the motion trajectory. Therefore, before the motion unit drives the motion head to actually work, the two linear motion parts in the motion unit need to be calibrated to ensure that they are at a standard 90° to work normally. The trajectory generation algorithm is essentially a fitting algorithm between theoretical and actual curves. In the process of generating the motion trajectory, the existing technology generally splits the overall motion trajectory into arcs and straight lines, and then uses splicing to restore the overall motion trajectory. Regardless of the trajectory generation algorithm, it ultimately needs to be converted into the underlying point set trajectory. The more line segments the actual trajectory generates, the greater the error in the theoretical calculation and the actual deviation will be, resulting in the problems of cumbersome steps and large errors in the existing method. Summary of the Invention
[0003] In order to overcome the deficiencies in the prior art, an embodiment of the present invention provides a motion path control method for obtaining a workpiece edge trajectory using an automated machine, which is used to solve one or more of the above problems.
[0004] An embodiment of the present application discloses: a motion path control method for obtaining the edge trajectory of a workpiece using an automated machine, wherein the automated machine includes a workbench and a motion unit arranged above the workbench, and the motion unit can be used to drive a motion head thereon to move along a plane parallel to the workbench, comprising the following steps: placing a standard workpiece on the workbench; the motion unit drives the motion head to move along the edge of the standard workpiece to be measured to obtain the edge trajectory of the standard workpiece; splitting the obtained edge trajectory and obtaining at least one geometric relationship model, wherein each of the geometric relationship models is one of a straight line, an ellipse or a circle; determining the trajectory equation of each obtained geometric relationship model; giving a spacing dl between two adjacent points, and obtaining the coordinates of each point in each geometric relationship model according to the trajectory equation; the motion unit drives the motion head to move in sequence according to the point coordinates, so that the motion head moves along the edge of the workpiece to be measured on the workbench.
[0005] Furthermore, in the step of "determining the trajectory equation of each of the geometric relationship models", if the geometric relationship model is a straight line, at least two points therein are taken to form the trajectory equation of the geometric relationship model; if the geometric relationship model is a circle, at least three points therein are taken to form the trajectory equation of the geometric relationship model; if the geometric relationship model is an ellipse, at least four points therein are taken to form the trajectory equation of the geometric relationship model.
[0006] Furthermore, in the step of "given the spacing dl between two adjacent points, and obtaining the coordinates of each point in each of the geometric relationship models based on the trajectory equation", the following steps are included: determining the first remaining distance L1 and the second remaining distance L2 in each of the geometric relationship models, the part of each of the geometric relationship models between L1 and L2 is n points, so as to fit the adjacent geometric relationship models, wherein the sum of L2 in each of the geometric relationship models and L1 of the next geometric relationship model is dl.
[0007] Furthermore, in the step of "given the distance dl between two adjacent points, and obtaining the coordinates of each point in each geometric relationship model according to the trajectory equation", when the geometric relationship model is a circle, the following steps are used to calculate the coordinates of the point: taking the Y axis as the reference, defining counterclockwise as positive and clockwise as negative; giving the starting angle θ of the arc start , end angle θ end , the radius R of the arc and the distance dl between the two moving points; dθ is obtained from the radian formula: From P start to P end The arc length between is defined as L: L = |θ end -θ start|×R; calculate the number n of integer points in the geometric relationship model whose distance satisfies dl: Where floor(x) is the floor rounding function; obtain L2 in the geometric relationship model: L2 = L-L1-n×dl; obtain the point coordinates P of the i-th point in the geometric relationship model i : Among them, when θ end >θ start hour, When θ end <θ start hour,
[0008] Furthermore, in the step of "given the distance dl between two adjacent points, and obtaining the coordinates of each point in each geometric relationship model according to the trajectory equation", when the geometric relationship model is a straight line, the following steps are used to calculate the coordinates of the point: given the starting coordinates P of the straight line segment start and the end point coordinates P end And the distance dl between the two moving points; the length L of the line is obtained from the distance formula between the two points; the number n of integer points in the geometric relationship model whose distance satisfies dl is calculated: Where floor(x) is a floor function; L2 in the geometric relationship model is obtained as: L2 = L - L1 - n × dl; the coordinates of the starting point in the integer point are obtained as: According to the recursive formula Get the coordinates of the i-th point in the geometric relationship model:
[0009]
[0010] Furthermore, the following steps are used to obtain dx and dy: Calculate the slope K of the straight line geometric relationship model:
[0011] According to the slope K, P is obtained i and P i+1 The X-axis coordinate difference between them is:
[0012] According to the slope K, P is obtained i and P i+1 The Y-axis coordinate difference between them is:
[0013] Furthermore, in the step of "given the distance dl between two adjacent points, and obtaining the coordinates of each point in each geometric relationship model according to the trajectory equation", when the geometric relationship model is an ellipse, the following steps are used to calculate the coordinates of the point: the Y-axis direction is proportional to Scaling is performed, the original coordinate space is marked as γ, and the scaled coordinate space is marked as δ; the starting angle θ of the given ellipse start , end angle θ end , long axis Rx, short axis Ry and the distance dl between the two points of the moving point; the conversion formula when the coordinate is converted from δ to γ is defined as F(P), and the point coordinate function in δ space is: Thus, the point coordinate function in the γ space based on F(P) is obtained: Perform affine transformation to obtain the point coordinate function in γ space:
[0014] The following steps are further used to obtain the angle θ at each position: iγ =dl and L iγ =|P (i+1)γ -P iγ |, we get: Define the intermediate small quantity Δθ i is Δθ i =θ i+1 -θ i , we get the approximate formula: Based on the approximate formula, we can get Then we get Δθ i Approximate value of :
[0015] To get the recursive formula for the angle between adjacent points: According to L1<dl, Δθ i The approximate value of is similarly replaced by the approximate value of θ0: Taking θ0 as the starting point, substitute into the approximate formula In the equation, we get the angle θ at each position.
[0016] Furthermore, the following steps are used to obtain L2: Recursive approximation formula Until θ n+1 >θ end And θ n ≤θ end , to obtain the approximate formula: Get the L2 approximation:
[0017] Furthermore, the motion unit includes a first linear motion part and a second linear motion part that form an angle with each other, the motion directions of the first linear motion part and the second linear motion part are parallel to the workbench, and the second linear motion part is connected to the motion head.
[0018] The beneficial effects of the present invention are as follows:
[0019] 1. After installing the motion unit, the edge trajectory can be directly acquired and the coordinates of each point can be obtained, which saves the calibration step for the motion unit. The standard edge trajectory is split into circles, straight lines and ellipses, which can achieve a better fitting effect for arcs with variable curvature, avoiding splitting into single circular arcs at each curvature change position, thereby reducing the number of splicing segments and improving the fitting accuracy, making the steps of the entire method simpler and with smaller errors.
[0020] 2. The trajectory equation of each segment of the geometric relationship model can be obtained by selecting corresponding points with coordinates on the two-dimensional coordinate system formed in the two-dimensional plane where the workbench is located, thereby obtaining the trajectory equations of all the geometric relationship models in the standard edge trajectory.
[0021] 3. By obtaining the first residual distance L1 and the second residual distance L2 in each geometric relationship model, the coordinates of each point in the adjacent geometric relationship model are fitted, thereby ensuring that the distance between adjacent points in the adjacent geometric relationship model is still dl, and then the distance between each point in the entire standard edge trajectory is dl, achieving the fitting effect between the adjacent geometric relationship models.
[0022] 4. Pass the starting angle θ of the given arc start , end angle θ end , the radius R of the arc and the distance dl between the two moving points, so that the number n of integer points in the circular geometric relationship model at the distance dl can be obtained, and then the point track coordinates of each integer point can be obtained, so that the edge track of the circular geometric relationship model can be formed during the movement of the moving head along the point track coordinates.
[0023] 5. The starting coordinate P of the line segment passing through the given straight line start and the end point coordinates P end , and the distance dl between the two moving points, so that the number n of integer points in the straight line geometric relationship model at the distance dl can be obtained, and then the point track coordinates of each integer point can be obtained, so that the edge track of the straight line geometric relationship model can be formed during the movement of the moving head along the point track coordinates.
[0024] 6. By the starting angle θ of the given ellipse start , end angle θ end , the major axis Rx, the minor axis Ry and the distance dl between the two points of the moving point, so that the specific angle θ of the position of each point in the ellipse can be obtained, and then the point coordinates of each point can be obtained, so that the edge trajectory of the elliptical geometric relationship model can be formed during the movement of the moving head along the point coordinates.
[0025] In order to make the above and other objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0027] Figure 1 This is a flow chart of a motion path control method for obtaining a workpiece edge trajectory using an automated machine in an embodiment of the present invention;
[0028] Figure 2 This is a schematic diagram of the angle relationship of a motion path control method for obtaining a workpiece edge trajectory using an automated machine in an embodiment of the present invention when the geometric relationship model is a circle;
[0029] Figure 3 This is a schematic diagram of the relationship between points in a motion path control method for obtaining a workpiece edge trajectory using an automated machine in an embodiment of the present invention when the geometric relationship model is a circle;
[0030] Figure 4 This is a schematic diagram of the relationship between adjacent points in a motion path control method for obtaining a workpiece edge trajectory using an automated machine in an embodiment of the present invention when the geometric relationship model is a circle;
[0031] Figure 5 This is a schematic diagram of the point trace relationship of a motion path control method for obtaining a workpiece edge trajectory using an automated machine in an embodiment of the present invention when the geometric relationship model is a straight line;
[0032] Figure 6 This is a schematic diagram of the relationship between adjacent points in a motion path control method for obtaining a workpiece edge trajectory using an automated machine in an embodiment of the present invention when the geometric relationship model is a straight line;
[0033] Figure 7 This is a schematic diagram of the quantitative relationship of a motion path control method for obtaining a workpiece edge trajectory using an automated machine in an embodiment of the present invention when the geometric relationship model is an ellipse;
[0034] Figure 8 This is a schematic diagram of the relationship between points after transformation when the geometric relationship model is an ellipse, in a motion path control method for obtaining a workpiece edge trajectory using an automated machine in an embodiment of the present invention;
[0035] Figure 9 It is a schematic diagram of the relationship between adjacent points before and after transformation when the geometric relationship model is an ellipse in a motion path control method for obtaining a workpiece edge trajectory using an automated machine in an embodiment of the present invention. DETAILED DESCRIPTION
[0036] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0037] like Figures 1 to 9 As shown, a motion path control method for obtaining a workpiece edge trajectory using an automated machine is provided in this embodiment, wherein the automated machine includes a workbench and a motion unit disposed above the workbench, wherein the motion unit is capable of driving a motion head thereon to move along a plane parallel to the workbench. The motion path control method includes the following steps:
[0038] A standard workpiece is placed on the workbench. The standard workpiece is a workpiece to be measured with a standard size. The standard workpiece is used by the motion unit to obtain a standard edge trajectory, thereby providing a standard for measuring subsequent workpieces to be measured.
[0039] The motion unit drives the motion head to move along the edge of the standard workpiece to be measured to obtain the edge trajectory of the standard workpiece. The edge trajectory of the standard workpiece is the motion trajectory of the motion head driven by the motion unit after moving along the edge of the standard workpiece, so that when the motion head is driven by the motion unit to obtain the trajectory, the standard edge trajectory of the standard workpiece placed on the workbench can be obtained in this motion unit environment.
[0040] The obtained edge trajectory is segmented to obtain at least one geometric relationship model, wherein each geometric relationship model is a straight line, an ellipse, or a circle. Thus, the entire edge trajectory is manually segmented into straight line, ellipse, or circle segments according to the trajectory, and these segments are fitted and spliced to reproduce the standard edge trajectory. It is worth noting that due to errors in the installation of motion units and the fact that many workpieces are not simply composed of arcs and straight lines, but rather curves with varying curvature, ellipse fitting is more effective than arc fitting for these parts. Therefore, straight lines, ellipses, and circles are used to segment the standard edge trajectory.
[0041] Determine the trajectory equation of each of the geometric relationship models. During this process, first construct a two-dimensional coordinate system in the two-dimensional plane where the workbench is located, and then select multiple points on each of the geometric relationship models and substituted them into the corresponding standard equations. That is, for the cases where the geometric relationship models are straight lines, ellipses and circles, select multiple points thereon and substituted them into the standard equations of straight lines, ellipses and circles respectively, so as to obtain the trajectory equation of each of the geometric relationship models.
[0042] Given the spacing dl between two adjacent points, and obtaining the coordinates of each point in each geometric relationship model based on the trajectory equation, by setting dl, the distance between each point in the trajectory equation can be kept the same, that is, dl, thereby obtaining the standard edge trajectory in which the distance between each point remains the same.
[0043] The motion unit drives the motion head to move sequentially according to the point track coordinates, so that the motion head moves along the edge of the workpiece to be measured on the workbench, thereby achieving the effect of moving the edge of the subsequent workpiece to be measured by the motion head moving along the standard edge trajectory. Preferably, the motion head is a carving knife, a grinding head, a gluing head, or an edge detection camera, so that the effects of engraving, grinding, gluing, or edge detection can be achieved during this movement process.
[0044] By using the above method, the edge trajectory can be directly acquired and the coordinates of each point can be obtained after the motion unit is installed, which saves the calibration step of the motion unit. The standard edge trajectory is split into circles, straight lines and ellipses, which can achieve a better fitting effect for arcs with variable curvature, avoiding splitting into single circular arcs at each curvature change position, thereby reducing the number of splicing segments, improving the fitting accuracy, and making the steps of the entire method simpler and with smaller errors.
[0045] Specifically, in the step of "determining the trajectory equation of each of the geometric relationship models", if the geometric relationship model is a straight line, at least two points therein are taken to form the trajectory equation of the geometric relationship model, and then at least two points on the two-dimensional coordinate system formed in the two-dimensional plane where the workbench is located are substituted into the standard equation of the straight line to obtain the trajectory equation when the corresponding geometric relationship model is a straight line.
[0046] If the geometric relationship model is a circle, at least three points therein are taken to form the trajectory equation of the geometric relationship model, and then at least three points on the two-dimensional coordinate system formed in the two-dimensional plane where the workbench is located are substituted into the standard equation of the circle to obtain the trajectory equation when the corresponding geometric relationship model is a circle.
[0047] If the geometric relationship model is an ellipse, at least four points therein are taken to form the trajectory equation of the geometric relationship model, and then at least four points on the two-dimensional coordinate system formed in the two-dimensional plane where the workbench is located are substituted into the standard equation of the ellipse to obtain the trajectory equation when the corresponding geometric relationship model is an ellipse.
[0048] By using the above method, the trajectory equation of each segment of the geometric relationship model can be obtained by selecting corresponding points with coordinates on the two-dimensional coordinate system formed in the two-dimensional plane where the workbench is located, thereby obtaining the trajectory equations of all the geometric relationship models in the standard edge trajectory.
[0049] Specifically, the step of "given the distance d1 between two adjacent points, and obtaining the coordinates of each point in each of the geometric relationship models according to the trajectory equation" includes the following steps:
[0050] Determine the first remaining distance L1 and the second remaining distance L2 in each geometric relationship model, and the part of each geometric relationship model curve between L1 and L2 is n points to fit the adjacent geometric relationship models, wherein the sum of L2 in each geometric relationship model and L1 of the next geometric relationship model is dl. If the current geometric relationship model is the first geometric relationship model in the edge trajectory, L1 is 0, thereby obtaining L2 in the first geometric relationship model, and then according to the sum of L2 in each geometric relationship model and L1 of the next geometric relationship model is dl, obtain L1 in the next geometric relationship model, and obtain each L2 and L1 in sequence, that is, after obtaining L2 in each geometric relationship model, according to the sum of L2 in each geometric relationship model and L1 of the next geometric relationship model is dl, it is meaningless to obtain L1 of the next geometric relationship model.
[0051] By using the above method, the coordinates of each point in the adjacent geometric relationship model are fitted by obtaining the first residual distance L1 and the second residual distance L2 in each geometric relationship model, thereby ensuring that the distance between adjacent points in the adjacent geometric relationship model is still dl, and then the distance between each point in the entire standard edge trajectory is dl, thereby achieving the fitting effect between the adjacent geometric relationship models.
[0052] Specifically, in the step of "given the distance d1 between two adjacent points, and obtaining the coordinates of each point in each of the geometric relationship models according to the trajectory equation", when the geometric relationship model is a circle, the following steps are used to calculate the coordinates of the point:
[0053] like Figure 2As shown, with the Y axis as the reference, counterclockwise is defined as positive and clockwise as negative, thereby determining and unifying the moving direction of the circular dot traces.
[0054] like Figure 2 and Figure 3 As shown, the starting angle θ of the given arc start , end angle θ end , the radius R of the arc and the distance dl between the two moving points, where the starting angle θ of the arc start and end angle θ end The arc radius R is obtained from measurement, and the trajectory equation in the previous step is used. The spacing dl is uniformly specified for the entire standard edge trajectory, so that dl is equal in each geometric relationship model. Preferably, dl can be less than one-third of the radius R to increase the accuracy of each point. Of course, the relationship between dl and radius R can be adjusted according to actual needs.
[0055] like Figure 3 and Figure 4 As shown, dθ is obtained from the radian formula: Here, dθ is the angle change between each adjacent point in the geometric relationship model. Since dl and R are both known, the specific value of dθ can be directly obtained according to this formula.
[0056] like Figure 3 As shown, from P start to P end The arc length between is defined as L: L = |θ end -θ start |×R, due to the starting angle θ start , end angle θ end The radius R of the arc is known, so the total arc length L can be directly obtained according to the formula.
[0057] like Figure 3 The number n of integer points whose distances satisfy dl in the geometric relationship model is calculated as shown below: Among them, floor(x) is the rounding function, because the starting angle θ start , end angle θ end , the arc radius R, the angle change dθ, and the first remaining distance L1 are all known, so the specific value of n can be directly obtained according to this formula. It is worth noting that if the current geometric relationship model is the first geometric relationship model in the edge trajectory, L1 is 0.
[0058] like Figure 3As shown, L2 in the geometric relationship model is obtained: L2 = L-L1-n×dl. Since the total arc length L, the first remaining distance L1, the number of integer points n and the spacing dl are all known before, the second remaining distance L2 in the geometric relationship model can be directly obtained according to the formula.
[0059] like Figure 4 As shown, the point coordinates P of the i-th point in the geometric relationship model are obtained. i :
[0060] Among them, when θ end >θ start hour, When θ end <θ start hour, This ensures that the starting angle θ0 of the integer point is always positive. It is worth noting that if the current geometric relationship model is the first geometric relationship model in the edge trajectory, L1 is 0. Since the radius R of the arc, the angle change value dθ and the starting angle θ0 of the integer point are all known before, after substituting i, the point trajectory coordinate P of the i-th point in the geometric relationship model is i It can be obtained, thereby obtaining the point coordinates of each point in the n points in the geometric relationship model.
[0061] By using the above method, the starting angle θ of the given arc is start , end angle θ end , the radius R of the arc and the distance dl between the two moving points, so that the number n of integer points in the circular geometric relationship model at the distance dl can be obtained, and then the point track coordinates of each integer point can be obtained, so that the edge track of the circular geometric relationship model can be formed during the movement of the moving head along the point track coordinates.
[0062] Specifically, in the step of "given the distance d1 between two adjacent points, and obtaining the coordinates of each point in each of the geometric relationship models according to the trajectory equation", when the geometric relationship model is a straight line, the following steps are used to calculate the coordinates of the point:
[0063] like Figure 5 As shown, the starting coordinates P of the given straight line segment start and the end point coordinates P end , and the distance dl between the two points of the movement point, wherein the starting coordinate P of the straight line start and the end point coordinates P end The distance d1 is obtained from measurement and is uniformly specified for the entire standard edge trajectory, so that the d1 in each of the geometric relationship models is equal.
[0064] like Figure 5 As shown, the length L of the straight line is obtained from the distance formula between two points, so according to the starting coordinates P start and the end point coordinates P end Get the distance between the two points, and then get the length L of the straight line. Since the starting coordinate P start and the end point coordinates P end All are known, so the specific value of L can be directly obtained.
[0065] like Figure 5 As shown, calculate the number n of integer points in the geometric relationship model whose distance satisfies dl: Where floor(x) is a floor function. Since the length L of the line, the spacing dl, and the first remaining distance L1 are all known, the specific value of n can be directly obtained according to this formula. It is worth noting that if the current geometric relationship model is the first geometric relationship model in the edge trajectory, L1 is 0.
[0066] like Figure 5 As shown, L2 in the geometric relationship model is obtained: L2 = L-L1-n×dl. Since the length L of the straight line, the first remaining distance L1, the number of integer points n and the spacing dl are all known before, the second remaining distance L2 in the geometric relationship model can be directly obtained according to the formula.
[0067] like Figure 5 and Figure 6 As shown, the coordinates of the starting point in integer points are obtained: The 0th point is the starting position of the integer point, dx is the change in the x value of the adjacent integer point, and dy is the change in the y value of the adjacent integer point. Since the x value of the starting coordinate is P startx , the y value of the starting coordinate P starty , the spacing d1 and the first remaining distance L1 are all known, so after obtaining dx and dy, the specific value of n can be directly obtained according to the formula.
[0068] like Figure 5 and Figure 6 As shown, according to the recursive formula Get the coordinates of the i-th point in the geometric relationship model: It is worth noting that if the current geometric relationship model is the first geometric relationship model in the edge trajectory, L1 is 0. Since the x value of the starting coordinate P startx , the y value of the starting coordinate P starty , the spacing dl and the first remaining distance L1 are all known, so after substituting i, when dx and dy are obtained, the point coordinate P of the i-th point in the geometric relationship model is iIt can be obtained, thereby obtaining the point coordinates of each point in the n points in the geometric relationship model.
[0069] By using the above method, the starting coordinates P of the given straight line segment are start and the end point coordinates P end , and the distance dl between the two moving points, so that the number n of integer points in the straight line geometric relationship model at the distance dl can be obtained, and then the point track coordinates of each integer point can be obtained, so that the edge track of the straight line geometric relationship model can be formed during the movement of the moving head along the point track coordinates.
[0070] Specifically, the following steps are used to obtain dx and dy:
[0071] Calculate the slope K of the straight line geometric relationship model: Since the x value of the starting coordinate is P startx , the y value of the starting coordinate P starty , the x value P of the end point coordinate endx and the y value P of the end point coordinate endy All are known, so the slope K can be directly obtained as a specific value.
[0072] According to the slope K, P is obtained i and P i+1 The X-axis coordinate difference between them is:
[0073]
[0074] According to the slope K, P is obtained i and P i+1 The Y-axis coordinate difference between them is:
[0075] Since the x value of the starting coordinate is P startx , the y value of the starting coordinate P starty , the x value P of the end point coordinate endx , the y value P of the end point coordinate endy Since the vector difference between points of equal distance on a line is fixed, the specific values of dx and dy can be obtained directly based on K.
[0076] By using the above method, the straight line geometric relationship model is converted into a vector calculation, so that the x value P of the existing starting coordinate is obtained. startx , the y value of the starting coordinate P starty , the x value P of the end point coordinate endx , the y value P of the end point coordinate endyThe change dx of the x value in the adjacent integer points and the change dy of the y value in the adjacent integer points are obtained by summing the distance dl, and then when dx and dy are obtained, the point coordinates of each of the n points in the geometric relationship model are obtained.
[0077] Specifically, in the step of "given the distance d1 between two adjacent points, and obtaining the coordinates of each point in each geometric relationship model according to the trajectory equation", when the geometric relationship model is an ellipse, the following steps are used to calculate the coordinates of the point:
[0078] Y-axis direction is proportional Scaling is performed, the original coordinate space is marked as γ, and the scaled coordinate space is marked as δ, so that the ellipse in the coordinate space γ is scaled into a circle in the coordinate space δ, and the radius of the circle in the coordinate space δ is Rx, so that the curvature of each point in the coordinate space δ is the same.
[0079] like Figure 7 As shown, the starting angle θ of the given ellipse start , end angle θ end , the major axis Rx, the minor axis Ry and the distance dl between the two points of the movement point, wherein the starting angle θ of the ellipse start and end angle θ end The major axis Rx and minor axis Ry of the ellipse are obtained by measurement and are obtained by the trajectory equation in the previous step. The spacing dl is uniformly specified for the entire standard edge trajectory, so that the dl in each of the geometric relationship models is equal.
[0080] like Figure 8 As shown in Figure 2, the conversion formula for defining coordinates when δ is converted to γ is F(P), and the point coordinate function in δ space is: Thus, the point coordinate function in the γ space based on F(P) is obtained:
[0081] Thus, the coordinate values based on the transformation formula F(P) in the γ space are constructed.
[0082] Perform affine transformation to obtain the point coordinate function in γ space: Thus, the coordinates of each point in the γ space are obtained. Since the major axis Rx and minor axis Ry of the ellipse are both known, when the angle θ of each point is obtained, the coordinates of the point with the angle θ in the geometric relationship model are f γ (θ) can be obtained, thereby obtaining the point coordinates of each point in the geometric relationship model.
[0083] By using the above method, the starting angle θ of the given ellipse is start , end angle θ end, the major axis Rx, the minor axis Ry and the distance dl between the two points of the moving point, so that the specific angle θ of the position of each point in the ellipse can be obtained, and then the point coordinates of each point can be obtained, so that the edge trajectory of the elliptical geometric relationship model can be formed during the movement of the moving head along the point coordinates.
[0084] Specifically, the angle θ at each position is obtained using the following steps:
[0085] like Figure 9 As shown, according to L iγ =dl and L iγ =|P (i+1)γ -P iγ |, where L iγ is the distance difference between each adjacent point in the γ space. Since the γ space is equidistant and the distance is dl, the spacing equation in the γ space is obtained: Thus, a quantitative relationship between the major axis Rx, the minor axis Ry, the spacing dl and the adjacent angles is constructed.
[0086] Define the intermediate small quantity Δθ i is Δθ i =θ i+1 -θ i , expand the spacing equation in the above γ space according to trigonometric functions, and we get
[0087]
[0088] With the help of Taylor expansion of sine function: And with the help of Taylor expansion of the cosine function: Since Δθ i is the middle small quantity, namely Δθ i <<1, which results in the second-order and higher-order values in the Taylor expansion of the sine function and the Taylor expansion of the cosine function being much smaller than the zero-order and first-order values. Therefore, Δθ i Substitute the first-order approximate formula of Taylor expansion of sine function and the first-order approximate formula of Taylor expansion of cosine function to obtain: sin(Δθ i )=Δθ i and cos(Δθ i )=1.
[0089] Then we can get the approximate formula: It is worth noting that since the above results are not 0, and Δθ i <<1, so the second-order and above remainders are much smaller than the first-order terms. Ignoring the second-order and above remainders has little effect on the results. Therefore, the approximate formula is ultimately a first-order approximate formula, which has the effect of approximate replacement and simplifies the calculation difficulty of each point coordinate.
[0090] After simplifying the above approximate formula, we can get Then we get Δθ i Approximate value of : Finally, the recursive formula for the angle between adjacent points is obtained: Thus, an approximate relationship between adjacent points is constructed based on the existing values.
[0091] According to L1<dl, we can get θ0-θ start <Δθ i , we can simultaneously set Δθ i The approximate value of is similarly replaced by the approximate value of θ0: So based on θ start Get the angle of the first point in the ellipse geometric relationship model.
[0092] Taking θ0 as the starting point, substitute into the formula In this way, the angle θ of each position is obtained, and the angle θ of each point is obtained in turn according to the recursive relationship. Since the major axis Rx, minor axis Ry, and spacing dl are all known, after substituting θ0 as the starting point, the specific value of the angle θ of each point can be obtained in turn.
[0093] By using the above method, with the help of a small amount of Δθ i The proportional relationship of each point before and after the transformation is approximately replaced, and the steps of obtaining the angle θ of each point in the elliptical geometric relationship model are simplified. Based on the existing major axis Rx, minor axis Ry, spacing dl and the approximate angle θ0 of the starting point, the approximate value θ of the position of each point is obtained, thereby obtaining the point coordinates of each point in the geometric relationship model.
[0094] Specifically, L2 is obtained by the following steps:
[0095] Recursive approximation formula Until θ n+1 >θ end And θ n ≤θ end , thus obtaining the approximate formula:
[0096] Thus, the angle θ of the last point in the ellipse geometric relationship model is constructed. n The approximate quantitative relationship between L2 and
[0097] Get the L2 approximation: Due to the long axis Rx, short axis Ry, spacing dl and end angle θ end All are known, so the angle θ of the next point is obtained by recursion nAfter that, the specific value of L2 can be obtained.
[0098] By using the above method, the angle θ of the last point in the ellipse geometric relationship model is obtained by recursive relationship. n The approximate quantitative relationship between L2 and the existing major axis Rx, minor axis Ry, spacing dl and end angle θ end The second remaining distance L2 in the elliptical geometric relationship model is obtained, thereby preparing for obtaining the first remaining distance L1 of the next geometric relationship model.
[0099] Specifically, the motion unit includes a first linear motion portion and a second linear motion portion that are angled with each other. The motion directions of the first linear motion portion and the second linear motion portion are parallel to the workbench. The second linear motion portion is connected to the motion head, so that the relative motion between the first linear motion portion and the second linear motion portion drives the motion head, making the motion of the motion head more stable. Preferably, the first linear motion portion and the second linear motion portion are at a 90° angle to each other. However, during actual installation, due to installation errors, it is impossible to ensure that the first linear motion portion and the second linear motion portion are at a perfect 90° angle. Therefore, during actual installation, the first linear motion portion and the second linear motion portion can be at an angle close to 90°.
[0100] Specific embodiments are used in the present invention to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, there may be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting the present invention.
Claims
1. A motion path control method for obtaining a workpiece edge trajectory using an automated machine, wherein: The automated machine comprises a workbench and a motion unit disposed above the workbench, wherein the motion unit is capable of driving a motion head thereon to move along a plane parallel to the workbench, and is characterized in that the process comprises the following steps: placing a standard workpiece on the workbench; The motion unit drives the motion head to move along the edge of the standard workpiece to be measured, so as to obtain the edge trajectory of the standard workpiece; Splitting the obtained edge trajectory and obtaining at least one geometric relationship model, wherein each of the geometric relationship models is one of a straight line, an ellipse, or a circle; Determining a trajectory equation of each of the obtained geometric relationship models; Given the distance dl between two adjacent points, and obtaining the coordinates of each point in each of the geometric relationship models according to the trajectory equation; The motion unit drives the motion head to move sequentially according to the point coordinates, so that the motion head moves along the edge of the workpiece to be measured on the workbench.
2. The motion path control method for obtaining a workpiece edge trajectory using an automated machine according to claim 1, characterized in that: In the step of "determining the trajectory equation of each of the obtained geometric relationship models", if the geometric relationship model is a straight line, at least two points therein are taken to form the trajectory equation of the geometric relationship model; If the geometric relationship model is a circle, taking at least three points therein to form a trajectory equation of the geometric relationship model; If the geometric relationship model is an ellipse, at least four points therein are taken to form a trajectory equation of the geometric relationship model.
3. The motion path control method for obtaining a workpiece edge trajectory using an automated machine according to claim 1, wherein: In the step of "given the distance d1 between two adjacent points, and obtaining the coordinates of each point in each of the geometric relationship models according to the trajectory equation", the following steps are included: Determine the first remaining distance L1 and the second remaining distance L2 in each of the geometric relationship models, and the part of each of the geometric relationship models between L1 and L2 is n points to fit the adjacent geometric relationship models, wherein the sum of L2 in each geometric relationship model and L1 of the next geometric relationship model is dl.
4. The motion path control method for obtaining a workpiece edge trajectory using an automated machine according to claim 3, wherein: In the step of "given the distance d1 between two adjacent points, and obtaining the coordinates of each point in each geometric relationship model according to the trajectory equation", when the geometric relationship model is a circle, the following steps are used to calculate the coordinates of the point: Taking the Y axis as the reference, define counterclockwise as positive and clockwise as negative; Given the starting angle θ of the arc start , end angle θ end , the radius R of the arc and the distance dl between the two moving points; Obtain dθ from the radian formula: From P start to P end The arc length between is defined as L: L = |θ end -θ start |×R; Calculate the number n of integer points in the geometric relationship model whose distance satisfies dl: Where, floor(x) is the floor rounding function; Get L2 in the geometric relationship model: L2 = L-L1-n×dl; Get the point coordinates P of the i-th point in the geometric relationship model i : in, When end >θ start when When end <θ start when 5. The motion path control method for obtaining a workpiece edge trajectory using an automated machine according to claim 3, wherein: In the step of "given the distance d1 between two adjacent points, and obtaining the coordinates of each point in each geometric relationship model according to the trajectory equation", when the geometric relationship model is a straight line, the following steps are used to calculate the coordinates of the point: Given the starting coordinates P of the line segment start and the end point coordinates P end and the distance dl between the two points of the movement; The length L of the straight line is obtained from the distance formula between two points; Calculate the number n of integer points in the geometric relationship model whose distance satisfies dl: Where, floor(x) is the floor rounding function; Get L2 in the geometric relationship model: Get the coordinates of the starting point among integer points: According to the recursive formula Get the coordinates of the i-th point in the geometric relationship model:
6. The motion path control method for obtaining a workpiece edge trajectory using an automated machine according to claim 5, characterized in that: Use the following steps to get dx and dy: Calculate the slope K of the straight line geometric relationship model: According to the slope K, P is obtained i and P i+1 The X-axis coordinate difference between them is: According to the slope K, P is obtained i and P i+1 The Y-axis coordinate difference between them is:
7. The motion path control method for obtaining a workpiece edge trajectory using an automated machine according to claim 3, wherein: In the step of "given the distance d1 between two adjacent points, and obtaining the coordinates of each point in each geometric relationship model according to the trajectory equation", when the geometric relationship model is an ellipse, the following steps are used to calculate the coordinates of the point: Y-axis direction is proportional Scaling is performed, the original coordinate space is marked as γ, and the scaled coordinate space is marked as δ; Given the starting angle θ of the ellipse start , end angle θ end , long axis Rx, short axis Ry and the distance dl between the two points of the motion point; The conversion formula when defining coordinates from δ to γ is F(P), and the point coordinate function in δ space is: Thus, the point coordinate function in the γ space based on F(P) is obtained: Perform affine transformation to obtain the point coordinate function in γ space:
8. The motion path control method for obtaining a workpiece edge trajectory using an automated machine according to claim 7, characterized in that: The angle θ at each position is obtained using the following steps: According to L iγ =dl and L iγ =|P (i+1)γ -P iγ |, we get: Define the intermediate small quantity Δθ i is Δθ i =θ i+1 -θ i , we get the approximate formula: Based on the approximate formula, we can get Then we get Δθ i Approximate value of : To get the recursive formula for the angle between adjacent points: According to L1<dl, Δθ i The approximate value of is similarly replaced by the approximate value of θ0: Taking θ0 as the starting point, substitute into the approximate formula In the equation, we get the angle θ at each position.
9. The motion path control method for obtaining a workpiece edge trajectory using an automated machine according to claim 8, characterized in that: The following steps are used to obtain L2: Recursive approximation formula Until θ n+1 >θ end And θ n ≤θ end , to obtain the approximate formula: Get the L2 approximation:
10. The motion path control method for obtaining a workpiece edge trajectory using an automated machine according to claim 1, wherein: The motion unit includes a first linear motion portion and a second linear motion portion that are angled with each other. The motion directions of the first linear motion portion and the second linear motion portion are parallel to the workbench. The second linear motion portion is connected to the motion head.