Internal path planning method for material surface dressing
Patent Information
- Application Number
- CN202610997675.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-06
- Publication Date
- 2026-09-29
AI Technical Summary
[0008]本发明提供一种物料表面修磨的内部路径规划方法,用于解决现有物料表面内部区域修磨过程中依赖人工判断、内部凸起区域难以稳定识别、路径点分散且难以形成连续修磨轨迹、路径规划未充分结合打磨头有效覆盖范围等问题
[0090]本发明通过线激光传感器获取物料修磨面的Z轴深度矩阵,并同步记录X轴位置数组和Y轴位置参数,使内部修磨路径能够与实际执行机构坐标对应;通过有效测量范围过滤、众数基准过滤和无效行列筛选,能够减少无效测量数据、物料倾斜放置以及传感器噪声对后续路径规划的影响;通过四向差分计算和最大差分值提取,能够从矩阵数据中识别修磨面内部的凹凸变化特征;通过表面相对高度矩阵与凹凸特征矩阵的关联筛选,能够将有效数据分为凸起层、平面层和凹下层,并将实际需要处理的凸起层数据作为内部待修磨点集;通过以重心位置为零点进行复平面或极坐标转换,并结合打磨头有效覆盖范围进行覆盖判断和路径基点筛选,能够减少重复路径点,提高内部修磨路径的连续性;通过根据路径点周围邻域内的Z轴深度值计算Z轴目标值,能够形成包含X轴、Y轴和Z轴运动信息的实际运动路径数组,从而提高物料表面内部区域自动修磨的稳定性和可执行性。
Smart Images

Figure CN122829655A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of automatic material surface grinding technology, and specifically relates to an internal path planning method for material surface grinding. Background Technology
[0002] In the production processes of machining, electrical equipment manufacturing, post-processing of castings, and finishing of resin castings, defects such as localized protrusions, overflow, burrs, residual edges, and unevenness often form on the surface of materials. Taking epoxy resin castings for dry-type transformers as an example, after casting and curing, problems such as resin overflow, localized accumulation, and uneven transition surfaces may exist on the surface and internal areas of the product. If these areas are not ground, they can easily affect subsequent assembly, insulation distance, appearance quality, and product consistency.
[0003] Current grinding methods largely rely on manual observation and operation. Operators typically judge which areas of the material surface need grinding based on experience, and then perform localized treatment using hand-held grinding tools or controlled grinding equipment. This method is highly dependent on operator experience, and different operators may have inconsistent standards for judging raised, flat, and recessed areas, easily leading to inconsistent grinding amounts, missed grinding, or over-grinding. Furthermore, for materials that are large in size, have complex surface morphology, or are produced in batches, manual grinding is inefficient, labor-intensive, and the grinding dust can have adverse effects on the working environment and personnel health.
[0004] With the development of automated inspection and automatic grinding equipment, three-dimensional data of the material surface can be acquired through line laser sensors, area laser sensors, or 3D vision devices. Then, robots, gantry platforms, or multi-axis actuators can drive the grinding head for automatic grinding. However, the 3D point cloud or depth matrix acquired by the sensors is usually only surface topography data and cannot be directly used as the motion path of the grinding equipment. For grinding the internal areas of the material surface, it is still necessary to further determine which points are the convex points that actually need grinding, which points are normal planes or concave points that should not be processed, and convert these points to be ground into a sequence of path points that can be continuously executed.
[0005] Existing automatic grinding path generation methods are generally more suitable for regular contours, regular edges, or preset template paths. When the area to be ground is located inside the material surface and is irregularly distributed, simply performing a full-coverage scan at fixed intervals will result in a large amount of invalid movement, reducing grinding efficiency. Simply extracting local protrusions based on height thresholds is easily affected by factors such as sensor defects, noise, tilted material placement, and local edge jumps, resulting in scattered and disordered path points, making it difficult to form a smooth and continuous grinding trajectory.
[0006] Furthermore, the grinding head has a certain actual contact area and effective grinding range. If each grinding point is treated as an independent target point during path planning, it can easily lead to problems such as an excessive number of path points, overlapping coverage of adjacent paths, and frequent start-ups and shutdowns of the equipment. If the spacing between path points is set too large, there may be residual areas that are not effectively covered. Therefore, in internal grinding path planning, it is necessary not only to identify the internal grinding points, but also to combine parameters such as the grinding head diameter, effective circumference length, coverage judgment radius, and path offset step size to perform coverage judgment, deletion, and path base point retention for the grinding points, so as to generate an internal grinding path that can both cover the grinding area and facilitate continuous execution by the equipment.
[0007] Therefore, there is an urgent need for a new internal path planning method for material surface grinding. Summary of the Invention
[0008] This invention provides an internal path planning method for grinding material surfaces, which solves problems such as reliance on manual judgment, difficulty in stably identifying internal protruding areas, scattered path points that are difficult to form a continuous grinding trajectory, and insufficient integration of path planning with the effective coverage of the grinding head during the grinding process of existing material surfaces.
[0009] To achieve the above objectives, the present invention adopts the following technical solution:
[0010] An internal path planning method for material surface grinding includes the following steps:
[0011] S1. Using a line laser sensor, the material to be refurbished is scanned along the X-axis to obtain the Z-axis depth matrix Z between the refurbished surface and the line laser sensor. Simultaneously, the X-axis position array and Y-axis position parameters corresponding to the Z-axis depth matrix Z are recorded to form spatial sampling data of the refurbished surface.
[0012] S2. Perform effective measurement range filtering, mode benchmark filtering, and invalid row and column screening on the Z-axis depth matrix Z to obtain the filtered Z-axis depth matrix Za, and synchronously update the X-axis position array according to the position of the filtered column.
[0013] S3. Perform four-way difference calculation on the filtered Z-axis depth matrix Za to obtain the left difference matrix, right difference matrix, upper difference matrix and lower difference matrix respectively, and take the maximum value of the difference value at the corresponding position in the four difference matrices to obtain the concavity and convexity feature matrix F used to characterize the concavity and convexity changes of the grinding surface.
[0014] S4. Using the same four-way difference method as in step S3, and employing a preset edge threshold for identifying edge transitions, edge recognition is performed on the filtered Z-axis depth matrix Za to obtain the edge feature matrix B.
[0015] S5. Based on the filtered Z-axis depth matrix Za and the concave-convex feature matrix F, perform layered identification on the effective data in the grinding surface to obtain the convex layer data, planar layer data and concave layer data, and at least use the convex layer data as the internal grinding point set T.
[0016] S6. Calculate the centroid position O based on the effective points in the internal grinding point set T or the filtered Z-axis depth matrix Za, and transform the points in the internal grinding point set T to the complex plane coordinate system or polar coordinate system with the centroid position O as the zero point.
[0017] S7. Based on the preset path planning method and the effective coverage range of the grinding head, perform coverage judgment and screening on the points in the internal grinding point set T, retain the path base points that can represent the corresponding coverage area, and delete the internal grinding points that have been covered by the effective coverage range of the grinding head.
[0018] S8. Repeat step S7 until all points in the internal grinding point set T are covered or the preset termination condition is met. Connect the remaining path base points according to the execution order to obtain the internal grinding path point set.
[0019] S9. Calculate the Z-axis target value of the corresponding path point based on the Z-axis depth value in the preset neighborhood around the internal grinding path point set, and combine it with the X-axis position array and Y-axis position parameters to convert the internal grinding path point set into the actual motion path array of the grinding equipment actuator.
[0020] Furthermore, the Z-axis depth matrix Z is represented as:
[0021] Z=[z ij ], where i = 0, 1, 2, ..., n, j = 0, 1, 2, ..., m;
[0022] Among them, z ij The Z-axis depth value corresponding to the sampling point in the i-th row and j-th column is represented as:
[0023] X=[x j ], where j = 0, 1, 2, ..., m;
[0024] Where, x j The X-axis translation position corresponding to the j-th column of the Z-axis depth matrix Z is represented; the Y-axis position parameter includes the installation height value of the line laser sensor or the Y-axis position value corresponding to each row of data in the Z-axis depth matrix Z, so that the spatial position corresponding to the sampling point in the i-th row and j-th column is represented as:
[0025] P ij =(x j y i , zij )
[0026] or:
[0027] P ij =(x j y0, z ij )
[0028] Among them, y i y0 represents the Y-axis position value corresponding to the i-th row of data, and y0 represents the Y-axis installation height value recorded by the line laser sensor during scanning.
[0029] Furthermore, in step S2, filtering the effective measurement range of the Z-axis depth matrix Z includes:
[0030] Let the effective measurement range of the line laser sensor be [L]. min L max Then, for the element z in the Z-axis depth matrix Z... ij Perform the following processing:
[0031] When L min ≤z ij ≤L max When, retain z ij ;
[0032] When z ij <L min or z ij >L max When the time comes, assign the value 0 to the corresponding position;
[0033] Among them, L min and L max Set according to the effective ranging range of the line laser sensor.
[0034] Furthermore, in step S2, the mode benchmark filtering of the Z-axis depth matrix after filtering the effective measurement range includes:
[0035] Obtain the mode value z of the non-zero elements in the Z-axis depth matrix after filtering the effective measurement range. m ;
[0036] Let the first offset value be b, and the effective height upper limit value be H, then the matrix element a after baseline filtering ij satisfy:
[0037] When 0 < z m -z ij When +b < H, a ij =z m -z ij +b;
[0038] When z m -z ij+b≤0, or z m -z ij When +b≥H, a ij =0;
[0039] Where b is a reference offset value set according to mechanical structure error, the normal unevenness of the grinding surface and the allowable error after grinding, and H is the upper limit of the effective height; in a specific embodiment, b=40mm and H=100mm.
[0040] Furthermore, in step S2, the invalid row and column filtering of the matrix after the mode benchmark filtering includes:
[0041] After filtering the matrix based on the mode benchmark, count the number of non-zero elements row by row. The row from top to bottom where the number of non-zero elements reaches the preset row count threshold is denoted as the upper row r. u The row whose number of the first non-zero elements reaches the preset row number threshold is denoted as the next row r. d Retain the rth u Reaching the rth d Row data;
[0042] After row filtering, count the number of non-zero elements column by column. The first column from left to right whose number of non-zero elements reaches the preset column number threshold is denoted as column c. l The column whose number of non-zero elements reaches the preset column number threshold from right to left is denoted as the right column c. r Keep the cth l Column up to c r The filtered Z-axis depth matrix Za is obtained from the column of data.
[0043] And according to the left column c l and the right column c r The X-axis position array is captured synchronously.
[0044] Furthermore, in step S3, the four-way difference calculation includes:
[0045] Let the element in the filtered Z-axis depth matrix Za be a. ij Then the left difference value d1 ij Rightward difference d2 ij Upward difference value d3 ij and downward difference d4 ij They are respectively:
[0046] d1 ij =|a ij -a i ,j-1|;
[0047] d2 ij =|a ij -ai ,j+1|;
[0048] d3 ij =|a ij -a i -1,j|;
[0049] d4 ij =|a ij -a i +1,j|;
[0050] Let the minimum threshold for convexity / concave recognition be D. min The maximum threshold for convexity / concave recognition is D. max When d1 ij d2 ij d3 ij or d4 ij Any difference value in D satisfies D min ≤d≤D max If the difference is zero, retain the difference value; otherwise, set the difference value to 0.
[0051] The element f in the concave-convex feature matrix F ij satisfy:
[0052] f ij =max(d1 ij d2 ij d3 ij d4 ij )
[0053] Among them, D min and D max The setting is based on the height of the protrusions or the degree of unevenness on the surface of the material to be ground; when the maximum protrusion height of the material to be ground is 20mm, D max Set to 20 × 1.1 = 22 mm, where 1.1 is an empirical magnification factor.
[0054] Furthermore, in step S5, the hierarchical identification includes:
[0055] The invalid positions in the filtered Z-axis depth matrix Za are assigned an invalid identifier value M, which is different from the valid depth value; in one specific embodiment, M = -10000;
[0056] Find the mode value 'a' for the data at non-M positions in the matrix after assigning an invalid identifier value M. m And form a surface relative height matrix C, wherein the elements c in the surface relative height matrix C ij satisfy:
[0057] when a ij When ≠ M, c ij =aij -a m ;
[0058] when a ij When =M, c ij =M;
[0059] Based on the correlation and filtering of data at corresponding positions of the surface relative height matrix C and the concave-convex feature matrix F, a layer matrix L is obtained, and the effective data is divided into a raised layer, a planar layer and a concave layer according to the numerical distribution in the layer matrix L.
[0060] The location data belonging to the protrusion layer is retained as the internal grinding point set T, and the locations that do not belong to the protrusion layer are assigned the invalid identifier value M.
[0061] Furthermore, in step S6, the calculation of the center of gravity position O includes:
[0062] Let N be the number of valid points involved in the centroid calculation, and let the plane coordinates of the kth valid point be (x, y). k y k If the centroid position O = (x) o y o ),in:
[0063] x o =(Σx k ) / N;
[0064] y o =(Σy k ) / N;
[0065] Using the centroid position O as the zero point, the position of each point in the internal grinding point set T is corrected to obtain the corrected complex plane coordinates w. k :
[0066] w k =(x k -x o )+i(y k -y o );
[0067] The complex plane coordinates w k Convert to polar coordinate parameter ρ k and θ k ,in:
[0068] ρ k =sqrt[(x k -x o ) 2 +(y k -y o ) 2 ];
[0069] θ k =atan2(y k -y o x k -x o ).
[0070] Furthermore, when the preset path planning method is a translational route with continuously changing angles under a circular distribution, step S7 includes:
[0071] According to the polar coordinate parameter θ k The points in the internal grinding point set T are sorted to obtain a sequence of candidate points with continuous angles;
[0072] Let the diameter of the grinding head be D. g The effective circumferential length of the grinding head is L e The path offset step size is S, and the coverage judgment radius is R. c ,in:
[0073] L e =αD g ;
[0074] S=βL e ;
[0075] 0 < α ≤ 1, 0 < β ≤ 1;
[0076] Starting from the first point in the candidate point sequence, the current path base point is used as the current path base point. The distance between the subsequent candidate points and the current path base point is then determined to be within the coverage area of the grinding head.
[0077] If the distance between subsequent candidate points and the current path base point is not greater than the coverage judgment radius R c If so, then delete the subsequent candidate point;
[0078] If the distance between the subsequent candidate point and the current path base point is greater than the coverage judgment radius R c If so, the subsequent candidate point or the point obtained by shifting the subsequent candidate point along the continuous angular direction by the path offset step S is retained as the next path base point;
[0079] Repeat the above judgment until the candidate point sequence judgment is completed to obtain the internal grinding path point set with continuously changing angles under circumferential distribution;
[0080] In one specific implementation, D g =100mm, α=0.8, L e =80mm, β=0.5, S=40mm, R c =45mm.
[0081] Furthermore, when the preset path planning method is an internal grinding path that gradually narrows inward along the edge, step S7 includes:
[0082] An edge point array is obtained based on the edge feature matrix B, and the position of the edge point array is corrected based on the centroid position O.
[0083] When the edge shape is curved, the corrected edge points are converted to polar coordinates based on the inner radius R of the grinding head. in and the outer radius R of the grinding head out Determine whether a point in the internal grinding point set T falls within the effective coverage area corresponding to the current edge point; if it falls within the effective coverage area, delete the point from the internal grinding point set T and retain the current edge point as a path point; after the previous round of edge point judgment is completed, reduce the polar coordinate magnitude of the edge point by a preset shrinkage step, while keeping the angle unchanged, to obtain the next round of edge point array, and continue to perform coverage judgment on the remaining internal grinding points;
[0084] When the edge shape is a polygonal edge composed of line segments, the X and Y coordinates of the edge points are indented by a preset step size in the direction toward the centroid position O in the complex plane coordinate system to obtain the next round of edge point array, and the remaining internal grinding points are covered and judged.
[0085] In each round of coverage judgment, redundant points that can be covered by adjacent path points are deleted and the edge point array is updated; the above process is repeated until the number of points in the internal grinding point set T is 0 or the edge points are shrunk to the point that the effective radius condition of the grinding head is not met.
[0086] For each obtained internal grinding path point, the target Z-axis value z′ of that internal grinding path point is obtained by averaging the effective Z-axis depth values within its surrounding preset neighborhood Ω. k ,in:
[0087]
[0088] Ω is the neighborhood centered on the internal grinding path point, determined by a preset number of points in the X direction and a preset number of points in the Y direction, and |Ω| is the number of valid points in the neighborhood Ω that participate in the averaging.
[0089] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0090] This invention acquires the Z-axis depth matrix of the material grinding surface using a line laser sensor, and simultaneously records the X-axis position array and Y-axis position parameters, ensuring that the internal grinding path corresponds to the coordinates of the actual actuator. Through effective measurement range filtering, mode benchmark filtering, and invalid row and column screening, it reduces the impact of invalid measurement data, material tilting, and sensor noise on subsequent path planning. Through four-way difference calculation and maximum difference value extraction, it can identify the internal unevenness features of the grinding surface from the matrix data. By correlating and filtering the surface relative height matrix with the unevenness feature matrix, it can further refine the grinding path. The effective data is divided into raised layers, planar layers, and recessed layers, with the actual raised layer data to be processed serving as the internal grinding point set. By performing complex plane or polar coordinate transformation with the center of gravity as the zero point, and combining the effective coverage range of the grinding head for coverage judgment and path base point selection, duplicate path points can be reduced, improving the continuity of the internal grinding path. By calculating the Z-axis target value based on the Z-axis depth value in the neighborhood around the path point, an actual motion path array containing X-axis, Y-axis, and Z-axis motion information can be formed, thereby improving the stability and executability of automatic grinding of the internal area of the material surface.
[0091] Of course, implementing the various technical solutions of this invention does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description
[0092] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained from these drawings without creative effort.
[0093] Figure 1 This is a flowchart of the internal path planning method for material surface grinding in an embodiment of the present invention;
[0094] Figure 2 This is a flowchart illustrating the spatial sampling data acquisition and matrix generation process according to an embodiment of the present invention.
[0095] Figure 3 This is a flowchart of matrix preprocessing and concave / convex feature recognition in an embodiment of the present invention;
[0096] Figure 4 This is a flowchart of the internal grinding point layer identification and coordinate transformation in an embodiment of the present invention;
[0097] Figure 5 This is a flowchart of the internal path base point selection process under a circular distribution in an embodiment of the present invention;
[0098] Figure 6This is a flowchart illustrating the internal path planning process that gradually shrinks inward along the edge in an embodiment of the present invention. Detailed Implementation
[0099] The present invention will now be described in further detail with reference to specific embodiments and accompanying drawings. Similar elements in different embodiments are referred to by associated similar element reference numerals. In the following embodiments, many details are described to facilitate a better understanding of the invention. However, those skilled in the art will readily recognize that some features may be omitted in different situations, or may be replaced by other elements, materials, or methods. In some cases, certain operations related to the present invention are not shown or described in the specification. This is to avoid obscuring the core parts of the invention with excessive description. For those skilled in the art, detailed description of these related operations is not necessary; they can fully understand the related operations based on the description in the specification and general technical knowledge in the art.
[0100] Furthermore, the features, operations, or characteristics described in the specification can be combined in any suitable manner to form various embodiments. At the same time, the steps or actions in the method description can be rearranged or adjusted in a manner obvious to those skilled in the art. Therefore, the various orders in the specification and drawings are only for the clear description of a particular embodiment and do not imply a necessary order, unless otherwise stated that a particular order must be followed.
[0101] The present invention will be further described below with reference to the accompanying drawings. It should be understood that the following embodiments are used to illustrate the technical solution of the present invention and are not intended to limit the scope of protection of the present invention. Without departing from the concept of the present invention, adjustments to the relevant parameters made by those skilled in the art based on material type, sensor model, grinding head specifications, and grinding equipment structure should all fall within the scope of protection of the present invention.
[0102] Example:
[0103] See Figures 1 to 6 This embodiment provides an internal path planning method for surface grinding of materials, applicable to resin castings, castings, plate-shaped workpieces, insulating parts, or other materials with internal surface protrusions, overflow, or local accumulation areas. Taking the surface grinding of epoxy resin castings for dry-type transformers as an example, the surface of the material after casting and curing may have local protrusions or irregular protrusion areas located within the edges. If manual grinding is used directly, problems such as missed grinding, over-grinding, or discontinuous paths are easily generated. This embodiment uses a line laser sensor to collect the Z-axis depth matrix of the material surface and combines it with the effective coverage area of the grinding head to generate an internal grinding path.
[0104] In this embodiment, the grinding equipment includes a line laser sensor, an X-axis actuator, a Y-axis actuator, a Z-axis actuator, a grinding head, and a controller. The line laser sensor is used to collect Z-axis depth data between the grinding surface and the line laser sensor; the X-axis actuator is used to move the line laser sensor or the material to be ground along the X-axis direction; the Y-axis actuator is used to determine the scanning position of the line laser sensor or the material to be ground in the Y-axis direction; the Z-axis actuator is used to adjust the feed position of the grinding head according to the planned Z-axis target value. The controller receives sensor data and actuator position data, and performs matrix filtering, convexity / concave identification, path selection, and path output.
[0105] See Figure 2 Before scanning begins, the material to be refurbished is placed on the support platform of the refurbishing equipment, ensuring the surface to be refurbished is within the effective measurement range of the line laser sensor. The line laser sensor scans the material along the X-axis, acquiring a set of Z-axis depth data distributed along the line direction at each scanning position. The controller arranges multiple sets of Z-axis depth data in the scanning order to form a Z-axis depth matrix Z, and simultaneously records the X-axis position array X corresponding to each column of data and the Y-axis position parameters corresponding to the row direction.
[0106] The Z-axis depth matrix Z is represented as:
[0107] Z=[z ij ], where i = 0, 1, 2, ..., n, j = 0, 1, 2, ..., m;
[0108] Among them, z ij This represents the Z-axis depth value corresponding to the sampling point in the i-th row and j-th column. The X-axis position array is represented as:
[0109] X=[x j ], where j = 0, 1, 2, ..., m;
[0110] Where, x j This represents the X-axis translation position corresponding to the j-th column of data. When each row of data from the line laser sensor corresponds to a specific Y-axis coordinate, the spatial position of the sampling point in the i-th row and j-th column is represented as:
[0111] P ij =(x j y i , z ij )
[0112] Where yi represents the Y-axis position value corresponding to the i-th row of data. When the line laser sensor scans at a fixed Y-axis mounting height, the spatial position of the sampling point can also be represented as:
[0113] P ij =(x jy0, z ij )
[0114] Where y0 is the Y-axis installation height value recorded by the line laser sensor during scanning.
[0115] See Figure 3 The controller first filters the effective measurement range of the Z-axis depth matrix Z. Let the effective measurement range of the line laser sensor be [L]. min L max ], when z ij Satisfy L min ≤z ij ≤L max At that time, retain the z ij When z ij <L min or z ij >L max When the time is right, the corresponding position is assigned a value of 0. This step can eliminate abnormal data caused by the line laser sensor being out of range, having abnormal reflections, or being an invalid measurement.
[0116] After filtering the effective measurement range, the controller statistically analyzes the non-zero elements in the Z-axis depth matrix to obtain the mode value zm, which has the most similar values. Since most areas on the surface of the material to be refurbished are typically relatively flat reference areas, the mode value zm... m This can be used to characterize the main surface height reference in the current scan data. Let the first offset value be b, and the effective height upper limit be H. The controller performs mode reference filtering on the matrix after filtering the effective measurement range, obtaining the filtered Z-axis depth matrix Za. The filtered matrix element a... ij satisfy:
[0117] When 0 < z m -z ij When +b < H, a ij =z m -z ij +b;
[0118] When z m -z ij +b≤0, or z m -z ij When +b≥H, a ij =0.
[0119] In one specific implementation, b = 40mm and H = 100mm. The first offset value b is used to compensate for material placement errors, mechanical installation errors, and normal unevenness errors of the grinding surface to be repaired; the upper limit of the effective height H is used to remove data that is obviously not within the normal surface protrusion range. Through the above-mentioned benchmark filtering, areas with certain protrusions or height changes relative to the benchmark surface can be retained, while abnormal data that are below or above the effective range are set to zero.
[0120] Subsequently, the controller performs invalid row and column filtering on the matrix after the mode benchmark filtering. Specifically, the controller counts the number of non-zero elements row by row, and the row from top to bottom where the number of non-zero elements reaches the preset row number threshold is denoted as the upper row r. u The row whose number of non-zero elements first reaches the preset row number threshold is denoted as the next row r. d And retain the rth u Reaching the rth d The data is in rows. The controller then counts the number of non-zero elements column by column, and the column from left to right where the number of non-zero elements reaches the preset column count threshold is designated as the left column c. l The column whose number of non-zero elements reaches the preset column number threshold from right to left is denoted as the right column c. r And retain the cth l Column up to c r The data in each column is used to obtain the filtered Z-axis depth matrix Za. During column filtering, the controller synchronously extracts the X-axis position array X according to the same column positions, so that the filtered Z-axis depth matrix Za and the updated X-axis position array still maintain a correspondence.
[0121] After matrix preprocessing, the controller performs four-way difference calculations on the filtered Z-axis depth matrix Za. Let the element in the filtered Z-axis depth matrix Za be a. ij The controller calculates the leftward difference value d1 respectively. ij Rightward difference d2 ij Upward difference value d3 ij and downward difference d4 ij :
[0122] d1 ij =|a ij -a i ,j-1|;
[0123] d2 ij =|a ij -a i ,j+1|;
[0124] d3 ij =|a ij -a i -1,j|;
[0125] d4 ij =|a ij -a i +1, j|.
[0126] Let the minimum threshold for convexity / concave recognition be D. min The maximum threshold for convexity / concave recognition is D. max When d1 ij d2 ij d3 ij or d4 ij Any difference value in D satisfies D min ≤d≤D max If the difference value is positive, retain it; otherwise, set the corresponding difference value to 0. Then, the controller takes the maximum value of the difference values in the four directions to obtain the concavity / convexity feature matrix F. The elements f in the concavity / convexity feature matrix F... ij satisfy:
[0127] f ij =max(d1 ij d2 ij d3 ij d4 ij ).
[0128] In one specific embodiment, if the highest protrusion height on the surface of the material to be refurbished is approximately 20 mm, then D max It can be set to 20 × 1.1 = 22 mm, where 1.1 is an empirical magnification factor. D min It can be set according to sensor noise and minimum grindable protrusion height to eliminate minor fluctuations. Through four-way difference calculation, it can identify height jumps between adjacent regions in the matrix, so that local protrusions, local depressions, or surface transition areas are highlighted in the convexity / concavity feature matrix F.
[0129] The controller also employs the same four-way differential method as described above, and uses a preset edge threshold for identifying edge transitions to perform edge recognition on the filtered Z-axis depth matrix Za, obtaining the edge feature matrix B. Edge feature matrix B is primarily used to determine the initial edge point array during subsequent layer-by-layer inward path planning along the edge. The preset edge threshold for identifying edge transitions can be greater than the concavity / convexity recognition threshold, or it can be set independently based on the abrupt changes in the material's outer contour height.
[0130] See Figure 4 The controller performs layered identification of valid data in the grinding surface based on the filtered Z-axis depth matrix Za and the concavity / convexity feature matrix F. First, invalid positions in the filtered Z-axis depth matrix Za are assigned invalidity flag values M, which differ from the valid depth values. In one specific implementation, M = -10000. Then, the mode value a is calculated for the data at non-M positions in the matrix after assigning invalidity flag values M.m This forms the surface relative height matrix C. The elements c in the surface relative height matrix C... ij satisfy:
[0131] when a ij When ≠ M, c ij =a ij -a m ;
[0132] when a ij When =M, c ij =M.
[0133] In one specific implementation, the controller performs correlation filtering based on data from the surface relative height matrix C and the concavity / convexity feature matrix F at corresponding locations to obtain a layered matrix L. Specifically, when a certain location satisfies c ij Greater than the preset protrusion threshold, and f ij When the difference exceeds a preset threshold for unevenness, the location is identified as a raised layer; when c ij When the location is within the preset planar tolerance range, the position is determined to be a planar layer; when c ij If the depth is less than a preset concave threshold, the location is identified as a concave layer. Alternatively, the layer matrix L can be formed using the following method:
[0134] When c ij ≠M and f ij When >0, l ij =c ij ×f ij ;
[0135] When c ij =M or f ij When =0, l ij =M.
[0136] Subsequently, according to l ij The numerical distribution is used to perform layered identification of valid data. The location data belonging to the protrusion layer are retained as the internal grinding point set T, while the locations not belonging to the protrusion layer are assigned an invalid identifier value M. The internal grinding point set T is used to represent the points inside the material surface that actually need to be ground.
[0137] After obtaining the internal grinding point set T, the controller calculates the center of gravity position O. Let N be the number of valid points involved in the center of gravity calculation, and let the plane coordinates of the kth valid point be (x...). k y k If the centroid position O = (x) o y o ),in:
[0138] x o =(Σx k ) / N;
[0139] y o =(Σy k ) / N.
[0140] In one implementation, the valid points participating in the centroid calculation can be all points in the internal set of points to be refurbished, T; in another implementation, the valid points participating in the centroid calculation can also be all valid points in the filtered Z-axis depth matrix Za. Using the centroid position O as the zero point allows subsequent path planning to unfold relative to the center of the area to be refurbished, reducing the impact of material placement offset on path sequencing.
[0141] The controller uses the center of gravity O as the zero point and corrects the position of each point in the internal grinding point set T to obtain the corrected complex plane coordinates w. k :
[0142] w k =(x k -x o )+i(y k -y o ).
[0143] Where i is the imaginary unit. The controller can also convert complex plane coordinates w k Convert to polar coordinate parameter ρ k and θ k :
[0144] ρ k =sqrt[(x k -x o ) 2 +(y k -y o ) 2 ];
[0145] θ k =atan2(y k -y o x k -x o ).
[0146] Where, ρ k θ represents the distance of the k-th internal grinding point relative to the centroid position O. k Let θ represent the angle of the k-th internal grinding point relative to the center of gravity O. The atan2 function is used to calculate θ. k This can avoid the errors in quadrant determination caused by the ordinary arctangent function.
[0147] See Figure 5 In one path planning method, the preset path planning method is a translational route with continuously changing angles under a circular distribution. The controller follows the polar coordinate parameter θ. kSort the points in the internal grinding point set T to obtain a sequence of candidate points with continuous angles. Let the diameter of the grinding head be D. g The effective circumferential length of the grinding head is L e The path offset step size is S, and the coverage judgment radius is R. c ,in:
[0148] L e =αD g ;
[0149] S=βL e ;
[0150] 0 < α ≤ 1, 0 < β ≤ 1.
[0151] Where α is the effective circumference ratio of the grinding head, and β is the step size ratio. In one specific embodiment, the grinding head diameter D g =100mm, α=0.8, then the effective circumference length L of the grinding head is... e =80mm; β=0.5, then the path offset step size S=40mm; the coverage judgment radius R c =45mm.
[0152] The controller starts from the first point in the candidate point sequence and uses that point as the current path base point. Then, it sequentially checks whether the distance between subsequent candidate points and the current path base point is within the coverage area of the grinding head. If the distance between a subsequent candidate point and the current path base point is not greater than the coverage judgment radius R... c If the distance between the subsequent candidate point and the current path base point is greater than the coverage radius R, then the controller removes the subsequent candidate point from the candidate point sequence, assuming that the subsequent candidate point can be covered by the grinding head coverage area corresponding to the current path base point. c If the subsequent candidate point cannot be covered by the current path base point, the controller retains the subsequent candidate point as the next path base point; or, the point obtained by offsetting the subsequent candidate point along the continuous angular direction by the path offset step S is retained as the next path base point.
[0153] After retaining a new path base point each time, the controller uses the new path base point as the current path base point and continues to perform coverage judgment on the internal grinding points that have not yet been judged in the candidate point sequence. This process is repeated until the candidate point sequence is judged, resulting in a set of internal grinding path points with continuously changing angles under a circumferential distribution. This path point set can cover the internal grinding area in a continuously changing angle manner, and reduces repeated grinding paths by deleting points already covered by the effective coverage area of the grinding head.
[0154] See Figure 6In another path planning method, the default path planning method is an internal grinding path that gradually narrows inward along the edge. The controller obtains an edge point array based on the edge feature matrix B and corrects the position of the edge point array based on the centroid position O. When the edge shape is curved, the controller converts the corrected edge points into polar coordinates based on the inner radius R of the grinding head. in and the outer radius R of the grinding head out Determine whether a point in the internal set of points to be repaired, T, falls within the effective coverage area corresponding to the current edge point. If a point to be repaired falls within the effective coverage area, the controller removes the point from the internal set of points to be repaired, T, and retains the current edge point as a path point.
[0155] After the previous round of edge point judgment is completed, the controller reduces the polar coordinate magnitude of the edge points by a preset shrinkage step size while keeping the angle unchanged, thus obtaining the next round of edge point array. It then continues to perform coverage judgment on the remaining internal grinding points. In other words, for curved edges, the controller advances the path layer by layer from the outside in by keeping the angle constant and gradually reducing the radius. The preset shrinkage step size can be set according to the effective width of the grinding head, for example, it can be set to 40mm, 45mm, or other values that match the coverage range of the grinding head.
[0156] When the edge shape is a polygonal edge composed of line segments, the controller, in the complex plane coordinate system, shrinks the X and Y coordinates of the edge points inward by a preset step in the direction towards the centroid O to obtain the next round of edge point array, and continues to perform coverage judgment on the remaining internal grinding points. For rectangular or polygonal edges, the edge points can be shrunk inward according to the normal direction of the corresponding edge line segment, or inward according to the direction of the edge point pointing to the centroid O.
[0157] During the path planning process of progressively shrinking inwards along the edge, the controller deletes redundant points that can be simultaneously covered by adjacent path points and updates the edge point array. This edge point coverage check and shrinkage update are repeated until the number of points in the internal grinding point set T is 0, or the edge points shrink to the point where the effective radius condition of the grinding head is no longer met. Thus, the controller obtains the internal grinding path point set that shrinks progressively along the edge.
[0158] For any of the internal grinding path points obtained by the above path planning methods, the controller calculates the average of the effective Z-axis depth values within its surrounding preset neighborhood Ω to obtain the target Z-axis value z′ of the internal grinding path point. k Specifically, let Ω be the neighborhood centered on the internal grinding path point, determined by a preset number of points in the X direction and a preset number of points in the Y direction, and |Ω| be the number of valid points within the neighborhood Ω participating in the averaging process. Then:
[0159] .
[0160] In one specific implementation, the neighborhood Ω can be set as a 3×3, 5×5, or 7×7 neighborhood centered on the path point, or the size of the neighborhood can be determined according to the actual contact diameter of the grinding head. If there is an invalid identifier value M or a 0 value within the neighborhood Ω, the invalid value will not be included in the averaging calculation. By averaging the effective Z-axis depth values within the neighborhood around the path point, the influence of single-point noise on the Z-axis target value can be reduced, making the Z-axis feed of the grinding head more stable.
[0161] Finally, the controller, combining the updated X-axis position array and Y-axis position parameters, converts the internal grinding path point set into an actual motion path array for the grinding equipment actuator. The actual motion path array can be represented as:
[0162] G=[G k ];
[0163] G k =(x′ k y′ k , z′ k ), k=1,2,…,s.
[0164] Where, x′ k Execute the X-axis coordinate y′ corresponding to the k-th path point. k The Y-axis coordinate z′ corresponding to the k-th path point is calculated. k This represents the target Z-axis value corresponding to the k-th path point. Depending on the control method of the grinding equipment, the actual motion path array G can further include the feed rate v. k Grinding head rotation speed ω k Duration of stay t k Or grinding pressure p k ,Right now:
[0165] G k =(x′ k y′ k , z′ k v k ω k , t k p k ).
[0166] When performing grinding, the controller first moves the grinding head to a safe height above the first path point in the actual motion path array G. Then, it lowers the Z-axis actuator to the corresponding Z-axis target value. Subsequently, it controls the X-axis and Y-axis actuators to move sequentially according to the actual motion path array G, enabling the grinding head to continuously grind the raised areas inside the material surface. After completing all path point executions, the controller raises the Z-axis actuator to a safe height and exits the current grinding area.
[0167] This embodiment reduces interference from invalid data by filtering the effective measurement range, filtering the mode benchmark, and screening invalid rows and columns; it obtains the concave-convex feature matrix through four-way difference and maximum difference value extraction; it determines the internal grinding points by screening the correlation between the surface relative height matrix and the concave-convex feature matrix; it achieves an ordered representation of the grinding points through centroid zero point, complex plane, or polar coordinate transformation; and it filters the path base points and deletes covered points based on the effective coverage range of the grinding head, ultimately forming an internal grinding path that can be executed by the grinding equipment. This method can adopt either a path method with continuously changing angles under circumferential distribution or a path method with progressively narrowing edges, which can adapt to the automatic grinding needs of internal areas of materials with different shapes. The above specific examples illustrate the invention only to help understand the invention and are not intended to limit the invention. For those skilled in the art, based on the ideas of the invention, several simple deductions, modifications, or substitutions can be made.
Claims
1. A method for internal path planning in material surface grinding, characterized in that, Includes the following steps: S1. Using a line laser sensor, the material to be refurbished is scanned along the X-axis to obtain the Z-axis depth matrix Z between the refurbished surface and the line laser sensor. Simultaneously, the X-axis position array and Y-axis position parameters corresponding to the Z-axis depth matrix Z are recorded to form spatial sampling data of the refurbished surface. S2. Perform effective measurement range filtering, mode benchmark filtering, and invalid row and column screening on the Z-axis depth matrix Z to obtain the filtered Z-axis depth matrix Za, and synchronously update the X-axis position array according to the position of the filtered column. S3. Perform four-way difference calculation on the filtered Z-axis depth matrix Za to obtain the left difference matrix, right difference matrix, upper difference matrix and lower difference matrix respectively, and take the maximum value of the difference value at the corresponding position in the four difference matrices to obtain the concavity and convexity feature matrix F used to characterize the concavity and convexity changes of the grinding surface. S4. Using the same four-way difference method as in step S3, and employing a preset edge threshold for identifying edge transitions, edge recognition is performed on the filtered Z-axis depth matrix Za to obtain the edge feature matrix B. S5. Based on the filtered Z-axis depth matrix Za and the concave-convex feature matrix F, perform layered identification on the effective data in the grinding surface to obtain the convex layer data, planar layer data and concave layer data, and at least use the convex layer data as the internal grinding point set T. S6. Calculate the centroid position O based on the effective points in the internal grinding point set T or the filtered Z-axis depth matrix Za, and transform the points in the internal grinding point set T to the complex plane coordinate system or polar coordinate system with the centroid position O as the zero point. S7. Based on the preset path planning method and the effective coverage range of the grinding head, perform coverage judgment and screening on the points in the internal grinding point set T, retain the path base points that can represent the corresponding coverage area, and delete the internal grinding points that have been covered by the effective coverage range of the grinding head. S8. Repeat step S7 until all points in the internal grinding point set T are covered or the preset termination condition is met. Connect the remaining path base points according to the execution order to obtain the internal grinding path point set. S9. Calculate the Z-axis target value of the corresponding path point based on the Z-axis depth value in the preset neighborhood around the internal grinding path point set, and combine it with the X-axis position array and Y-axis position parameters to convert the internal grinding path point set into the actual motion path array of the grinding equipment actuator.
2. The internal path planning method for material surface grinding according to claim 1, characterized in that, The Z-axis depth matrix Z is represented as: Z=[z ij ], where i = 0, 1, 2, ..., n, j = 0, 1, 2, ..., m; Among them, z ij The Z-axis depth value corresponding to the sampling point in the i-th row and j-th column is represented as: X=[x j ], where j = 0, 1, 2, ..., m; Where, x j The X-axis translation position corresponding to the j-th column of the Z-axis depth matrix Z is represented; the Y-axis position parameter includes the installation height value of the line laser sensor or the Y-axis position value corresponding to each row of data in the Z-axis depth matrix Z, so that the spatial position corresponding to the sampling point in the i-th row and j-th column is represented as: P ij =(x j ,y i ,z ij ) or: P ij =(x j ,y0,z ij ) Among them, y i y0 represents the Y-axis position value corresponding to the i-th row of data, and y0 represents the Y-axis installation height value recorded by the line laser sensor during scanning.
3. The internal path planning method for material surface grinding according to claim 1, characterized in that, In step S2, filtering the effective measurement range of the Z-axis depth matrix Z includes: Let the effective measurement range of the line laser sensor be [L]. min L max Then, for the element z in the Z-axis depth matrix Z... ij Perform the following processing: When L min ≤z ij ≤L max When, retain z ij ; When z ij <L min or z ij >L max When the time comes, the corresponding position will be assigned a value of 0; Among them, L min and L max Set according to the effective ranging range of the line laser sensor.
4. The internal path planning method for material surface grinding according to claim 3, characterized in that, In step S2, the mode benchmark filtering of the Z-axis depth matrix after filtering the effective measurement range includes: Obtain the mode value z of the non-zero elements in the Z-axis depth matrix after filtering the effective measurement range. m ; Let the first offset value be b, and the effective height upper limit value be H, then the matrix element a after baseline filtering ij satisfy: When 0 < z m -z ij +b < H, a ij = z m -z ij +b; When z m -z ij +b≤0, or z m -z ij When +b≥H, a ij =0; Where b is the reference offset value set according to the mechanical structure error, the normal unevenness of the grinding surface and the allowable error after grinding, and H is the upper limit of the effective height.
5. The internal path planning method for material surface grinding according to claim 4, characterized in that, In step S2, the invalid row and column filtering of the matrix after the mode benchmark filtering includes: After filtering the matrix based on the mode benchmark, count the number of non-zero elements row by row. The row from top to bottom where the number of non-zero elements reaches the preset row count threshold is denoted as the upper row r. u The row whose number of the first non-zero elements reaches the preset row number threshold is denoted as the next row r. d Retain the rth u Reaching the rth d Row data; After row filtering, count the number of non-zero elements column by column. The first column from left to right whose number of non-zero elements reaches the preset column number threshold is denoted as column c. l The column whose number of non-zero elements reaches the preset column number threshold from right to left is denoted as the right column c. r Keep the cth l Column up to c r The filtered Z-axis depth matrix Za is obtained from the column of data. And according to the left column c l and the right column c r The X-axis position array is captured synchronously.
6. The internal path planning method for material surface grinding according to claim 1, characterized in that, In step S3, the four-way difference calculation includes: Let the element in the filtered Z-axis depth matrix Za be a. ij Then the left difference value d1 ij Rightward difference d2 ij Upward difference value d3 ij and downward difference d4 ij They are respectively: d1 ij =|a ij -a i ,j-1|; d2 ij =|a ij -a i ,j+1|; d3 ij =|a ij -in i -1, j|; d4 ij =|a ij -has i +1,j|; Let the minimum threshold for convexity / concave recognition be D. min The maximum threshold for convexity / concave recognition is D. max When d1 ij d2 ij d3 ij or d4 ij Any difference value in D satisfies D min ≤d≤D max If the difference is zero, retain the difference value; otherwise, set the difference value to 0. The element f in the concave-convex feature matrix F ij satisfy: f ij =max(d1 ij ,d2 ij ,d3 ij ,d4 ij ) Among them, D min and D max The setting is based on the height of the protrusions or the degree of unevenness on the surface of the material to be refurbished.
7. The internal path planning method for material surface grinding according to claim 1, characterized in that, In step S5, the hierarchical identification includes: The invalid positions in the filtered Z-axis depth matrix Za are assigned invalid identifier values M, which are different from the valid depth values. Find the mode value 'a' for the data at non-M positions in the matrix after assigning an invalid identifier value M. m And form a surface relative height matrix C, wherein the elements c in the surface relative height matrix C ij satisfy: when a ij When ≠ M, c ij =a ij -a m ; when a ij When =M, c ij =M; Based on the correlation and filtering of data at corresponding positions of the surface relative height matrix C and the concave-convex feature matrix F, a layer matrix L is obtained, and the effective data is divided into a raised layer, a planar layer and a concave layer according to the numerical distribution in the layer matrix L. The location data belonging to the protrusion layer is retained as the internal grinding point set T, and the locations that do not belong to the protrusion layer are assigned the invalid identifier value M.
8. The internal path planning method for material surface grinding according to claim 1, characterized in that, In step S6, the calculation of the center of gravity position O includes: Let N be the number of valid points involved in the centroid calculation, and let the plane coordinates of the kth valid point be (x, y). k y k If the centroid position O = (x) o y o ),in: x o =(Σx k ) / N; y o =(Σy k ) / N; Using the centroid position O as the zero point, the position of each point in the internal grinding point set T is corrected to obtain the corrected complex plane coordinates w. k : w k =(x k -x o )+i(y k -y o ); The complex plane coordinates w k Convert to polar coordinate parameter ρ k and θ k ,in: ρ k =sqrt[(x k -x o ) 2 +(y k -y o ) 2 ]; θ k =atan2(y k -y o ,x k -x o )。 9. The internal path planning method for material surface grinding according to claim 8, characterized in that, When the preset path planning method is a translational route with continuously changing angles under a circular distribution, step S7 includes: According to the polar coordinate parameter θ k The points in the internal grinding point set T are sorted to obtain a sequence of candidate points with continuous angles; Let the diameter of the grinding head be D. g The effective circumferential length of the grinding head is L e The path offset step size is S, and the coverage judgment radius is R. c ,in: L e =αD g ; S=βL e ; 0<α≤1,0<β≤1; Starting from the first point in the candidate point sequence, the current path base point is used as the current path base point. The distance between the subsequent candidate points and the current path base point is then determined to be within the coverage area of the grinding head. If the distance between subsequent candidate points and the current path base point is not greater than the coverage judgment radius R c If so, then delete the subsequent candidate point; If the distance between the subsequent candidate point and the current path base point is greater than the coverage judgment radius R c If so, the subsequent candidate point or the point obtained by shifting the subsequent candidate point along the continuous angular direction by the path offset step S is retained as the next path base point; Repeat the above judgment until the candidate point sequence judgment is completed, and obtain the internal grinding path point set with continuously changing angle under circumferential distribution.
10. The internal path planning method for material surface grinding according to claim 8, characterized in that, When the preset path planning method is an internal grinding path that gradually narrows inward along the edge, step S7 includes: An edge point array is obtained based on the edge feature matrix B, and the position of the edge point array is corrected based on the centroid position O. When the edge shape is curved, the corrected edge points are converted to polar coordinates based on the inner radius R of the grinding head. in And the outer radius R of the grinding head out Determine whether a point in the internal grinding point set T falls within the effective coverage area corresponding to the current edge point; if it falls within the effective coverage area, delete the point from the internal grinding point set T and retain the current edge point as a path point; after the previous round of edge point judgment is completed, reduce the polar coordinate magnitude of the edge point by a preset shrinkage step, while keeping the angle unchanged, to obtain the next round of edge point array, and continue to perform coverage judgment on the remaining internal grinding points; When the edge shape is a polygonal edge composed of line segments, the X and Y coordinates of the edge points are indented by a preset step size in the direction toward the centroid position O in the complex plane coordinate system to obtain the next round of edge point array, and the remaining internal grinding points are covered and judged. In each round of coverage judgment, redundant points that can be covered by adjacent path points are deleted and the edge point array is updated; the above process is repeated until the number of points in the internal grinding point set T is 0 or the edge points are shrunk to the point that the effective radius condition of the grinding head is not met. For each obtained internal grinding path point, the target Z-axis value z′ of that internal grinding path point is obtained by averaging the effective Z-axis depth values within its surrounding preset neighborhood Ω. k ,in: Ω is the neighborhood centered on the internal grinding path point, determined by a preset number of points in the X direction and a preset number of points in the Y direction, and |Ω| is the number of valid points in the neighborhood Ω that participate in the averaging.