A machine vision-based PCB splitter milling cutter wear online detection and automatic compensation system

CN122820552APending Publication Date: 2026-09-25GENITEC DONGGUAN CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610783840.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-02
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

对于采用铣削方式进行分板的设备而言,铣刀在长期高速加工过程中会逐渐出现刃口磨钝、局部崩缺、切削有效半径变化以及排屑性能下降等情况,进而导致板边毛刺增大、边缘崩裂、局部分层、轮廓尺寸偏差加大以及转角位置质量不稳定等问题

Benefits of technology

[0023]本申请不以高速旋转刀具本体作为主要观测对象,而是以分板后的边缘及切削邻域图像作为切入点,先将分板结果图像与具体加工路径区段建立对应关系,再围绕各路径区段形成反映边缘位置偏移和边缘离散程度的路径质量状态,在此基础上进一步结合相邻区段之间的连续变化关系生成磨损补偿依据,最后把该依据直接映射为分板机后续加工中的轨迹修正量并执行自动补偿。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122820552A_ABST
    Figure CN122820552A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of wear detection, in particular to a PCB dividing machine milling cutter wear online detection and automatic compensation system based on machine vision, comprising: a local image window construction module for extracting the local image window of the continuous path section on the image; a quality state calculation module for calculating the edge center position of the current continuous path section, calculating the path quality value of the current continuous path section based on the edge center position, and constructing the path quality representation based on the path quality of all continuous path sections; a wear compensation calculation module for calculating the wear compensation basis value, constructing the wear compensation basis sequence based on the wear compensation basis value of all continuous path sections; a compensation execution module for reading the machining trajectory point sequence corresponding to the continuous path section, calculating the tangential direction vector, mapping the wear compensation basis sequence into the normal compensation amplitude sequence, and correcting the machining trajectory point sequence based on the normal compensation amplitude sequence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of wear detection technology, and more particularly to an online detection and automatic compensation system for wear of milling cutters in PCB depaneling machines based on machine vision. Background Technology

[0002] PCB depaneling machines are widely used in electronic manufacturing production lines. Their main function is to cut and separate PCBs according to predetermined contours after mounting, forming, or electrical testing. For equipment that uses milling for depaneling, the milling cutter will gradually experience dulling of the cutting edge, local chipping, changes in the effective cutting radius, and decreased chip removal performance during long-term high-speed machining. This leads to problems such as increased burrs on the board edge, edge cracking, local delamination, increased contour dimensional deviations, and unstable quality at corner positions. Since PCB materials are usually composed of resin, glass fiber, and copper layers, their cutting process differs significantly from that of ordinary metal parts. The impact of tool wear on the machining results often does not appear as a single dimensional error, but rather manifests as edge center position drift, edge diffusion, local chipping, and uneven quality degradation along the contour. Therefore, relying solely on machining length, number of machining cycles, or experienced tool life as the basis for tool replacement is insufficient to accurately reflect the true condition of the tool, easily leading to premature tool replacement or continued machining with worn tools.

[0003] In existing technologies, one approach involves manually inspecting the cutting tools or measuring machined samples offline after the machine stops to determine the degree of wear. This method relies on manual experience, has low detection efficiency, and is difficult to adapt to continuous production cycles. Another approach attempts to directly observe the cutting tool body during equipment operation or judge the tool status based on a single machining signal. However, due to the small size of the PCB milling cutter, high rotation speed, and strong interference from dust and debris in the cutting area, it is difficult to stably observe the cutting tool body online. Furthermore, a single signal is difficult to establish a stable correspondence with the actual board edge quality. Yet another type of compensation method uses a uniform tool compensation value or a fixed correction strategy, assuming that the impact of tool wear on the entire PCB separation path is basically the same. However, during PCB separation, the degree of impact varies in different path segments, different corner positions, and different local material areas. Uniform compensation cannot take into account the quality of the entire path, often resulting in insufficient compensation in some segments and overcompensation in others.

[0004] Therefore, the key problem with existing technologies is not just the difficulty in detecting tool wear, but the lack of a complete set of technical solutions that can accurately correspond the image of the board separation result to the actual machining path, can transform local edge changes into quality states distributed along the path, and can further directly transform this quality state into the basis for subsequent machining compensation. Summary of the Invention

[0005] To address the aforementioned problems, this invention provides an online detection and automatic compensation system for milling cutter wear on PCB depaneling machines based on machine vision.

[0006] To achieve the above objectives, this invention proposes an online detection and automatic compensation system for milling cutter wear on PCB depaneling machines based on machine vision, comprising:

[0007] The local image window construction module is used to acquire images of the PCB depaneling machine at the depaneling edge and cutting neighborhood, as well as the processing trajectory point sequence. The processing trajectory point sequence is divided into multiple continuous path segments, and each continuous path segment is mapped onto the image. The position of the theoretical cutting edge reference point in the equipment plane coordinate system is mapped to the center pixel position in the image. Based on the center pixel position, the local image window of the continuous path segment on the image is extracted.

[0008] The quality state calculation module is used to perform classical Sobel operator convolution on the local image window to generate a gradient matrix, then calculate the main direction of the gradient vector at the center of the local image window, define the local normal of the current continuous path segment based on the main direction, and project and average the gradient magnitude of the local image window along the tangent based on the local normal to obtain a one-dimensional edge response sequence. Based on the one-dimensional edge response sequence, the edge center position of the current continuous path segment is calculated, the path quality value of the current continuous path segment is calculated based on the edge center position, and a path quality characterization is constructed based on the path quality of all continuous path segments.

[0009] The wear compensation calculation module is used to calculate the continuous wear enhancement factor corresponding to the continuous path segment based on the path quality characterization, calculate the wear compensation basis value based on the path quality characterization and the continuous wear enhancement factor, and construct the wear compensation basis sequence based on the wear compensation basis values ​​of all continuous path segments.

[0010] The compensation execution module is used to read the sequence of processing trajectory points corresponding to continuous path segments, calculate the tangential direction vector, map the wear compensation basis sequence to the normal compensation amplitude sequence, and correct the processing trajectory point sequence based on the normal compensation amplitude sequence.

[0011] In some embodiments, the edge center position is generated by calculating an edge center function. The parameters of the edge center function include a one-dimensional edge response sequence, a discrete position index in the local normal direction, a path continuity constraint weight, and the edge center position of the previous adjacent continuous path segment. The one-dimensional edge response sequence represents the edge response intensity of the continuous path segment at the normal position.

[0012] In some embodiments, the path quality value is generated by calculating a quality function, the parameters of which include weighting coefficients, the edge center position of the local image window, and the reference center position of the local image window.

[0013] In some embodiments, the persistent wear enhancement factor is calculated and generated by a wear enhancement function, the parameters of which include path quality values, quality status values ​​of adjacent continuous path segments, and small positive numbers in the normalization.

[0014] In some embodiments, the wear compensation basis value is calculated and generated by a wear compensation function, the parameters of which include a quality status value, wear compensation basis values ​​for adjacent continuous path segments, path continuity constraint weights, and continuous wear enhancement weights.

[0015] In some embodiments, the normal compensation amplitude is generated by a rational function saturation model, the parameters of which include wear compensation basis value, maximum compensation amplitude, and transition parameter.

[0016] In some embodiments, the gradient matrix is ​​a gradient matrix in the horizontal and vertical directions.

[0017] In some embodiments, the center pixel position is generated by a homogeneous transformation function, the parameters of which include the position value of the theoretical cutting edge reference point of the continuous path segment in the device plane coordinate system, the scaling factor in the homogeneous coordinates, and the homography matrix between the camera and the device plane.

[0018] In some embodiments, the theoretical cutting edge reference point is calculated by combining the tool center trajectory point with the current tool position offset.

[0019] In some embodiments, reading the sequence of processing trajectory points corresponding to continuous path segments and calculating the tangential direction vector specifically includes:

[0020] Read the sequence of processing trajectory points corresponding to the continuous path segment;

[0021] The tangential direction vector of the continuous path segment is calculated based on the coordinate difference between adjacent trajectory points in the processing trajectory point sequence.

[0022] The beneficial effects of this invention are as follows:

[0023] This application does not take the high-speed rotating tool body as the main observation object, but takes the edge and cutting neighborhood image after board separation as the starting point. First, it establishes a correspondence between the board separation result image and the specific processing path segment. Then, it forms a path quality state reflecting the edge position offset and edge dispersion around each path segment. On this basis, it further combines the continuous change relationship between adjacent segments to generate wear compensation basis. Finally, it directly maps the basis to the trajectory correction amount in the subsequent processing of the board separation machine and performs automatic compensation.

[0024] Tool wear identification is no longer limited to judging single-point anomalies or the average state of the entire board, but is implemented as the quality changes and compensation distribution carried out segment by segment along the machining path, so that the detection results can be naturally incorporated into the control execution link, and the compensation action corresponds to the specific path position and local quality degradation.

[0025] Therefore, this invention addresses the problems of difficulty in directly and stably observing cutting tools, uneven distribution of edge quality issues along the path, and difficulty in directly using detection results for compensation and control in PCB depaneling scenarios. It proposes an overall solution that is oriented towards actual processing results, path segments, and subsequent execution actions, thereby improving the consistency of depaneling quality and enhancing the processing stability of equipment in continuous production processes. Attached Figure Description

[0026] Figure 1 This is a system block diagram of a PCB depaneling machine milling cutter wear online detection and automatic compensation system based on machine vision, as described in a specific embodiment of the present invention. Detailed Implementation

[0027] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0028] refer to Figure 1 As shown in the figure, this application proposes an online detection and automatic compensation system for milling cutter wear on PCB depaneling machines based on machine vision, including:

[0029] A local image window construction module is used to acquire images of the PCB depaneling machine at the depaneling edge and cutting neighborhood, as well as a sequence of processing trajectory points. The processing trajectory point sequence is divided into multiple continuous path segments, and each continuous path segment is mapped onto the image. The position of the theoretical cutting reference point in the equipment plane coordinate system is mapped to the center pixel position in the image. Based on the center pixel position, a local image window of the continuous path segment on the image is extracted. Specifically, this includes:

[0030] After the PCB depaneling machine completes the current contour cutting, the industrial camera captures images of the depaneling edge and the cutting neighborhood. The control system simultaneously outputs the actual trajectory point sequence of this processing. Instead of directly processing the entire image, the system first divides the trajectory point sequence into continuous path segments of fixed length. Then, it extracts the corresponding local results of each path segment from the image, forming a visual representation of the results arranged sequentially along the processing path. The reason for this approach is that quality variations during PCB depaneling exhibit distinct path location attributes. The edge states of straight segments, corner segments, and segments near bridges on the same board differ significantly. Only by first binding the image to each segment of the processing path can subsequent analysis of the path's quality state have a clear target. The path segment division is completed by the control system according to the interpolation point sequence. For example, when a boundary trajectory contains two thousand continuous trajectory points, every twenty trajectory points can constitute a path segment, thus dividing the entire boundary into one hundred segments, each corresponding to a small segment of continuous cutting. Each segment does not directly use all trajectory points to generate a complex contour area; instead, it takes the theoretical cutting edge reference point corresponding to the middle position of the segment as a local positioning benchmark. This theoretical cutting edge reference point is calculated from the tool center trajectory point output by the depaneling machine control card, combined with the nominal tool offset set in the current process. Therefore, it corresponds to the reference position of the target depaneling edge in the equipment's planar coordinate system. Since the spacing between trajectory points within this section has been stably constrained to a very small range by the control system, using this reference point to represent the section center ensures both accurate spatial positioning and stable image window extraction. This theoretical cutting reference point comes from the control system trajectory data and process tool position parameters, while the industrial camera image comes from the image acquisition card cache. Both have already been aligned using a calibration board during the equipment debugging phase, therefore the subsequent mapping calculations are deterministic.

[0031] The mapping from the center trajectory point of the path segment to the image pixel position adopts the homography transformation in planar imaging. This formula is derived from the classic pinhole imaging model and planar projection geometry. In the PCB depaneling scenario, the tool's operating area and the board edge are both located on the same working plane; therefore, the three-dimensional imaging relationship can be reduced to a two-dimensional homography relationship from the working plane to the image plane. The homogeneous transformation function is used to express the center point of the path segment on the working plane as homogeneous coordinates, and the corresponding pixel in the image as homogeneous coordinates. Its expression is:

[0032] ;

[0033] in, and It is the first The position value of the theoretical cutting edge reference point of each path segment in the equipment plane coordinate system is calculated by combining the tool center trajectory point in the middle of the segment with the nominal tool position offset. and It is the pixel position value in the image mapped to the center point; It is the scaling factor in homogeneous coordinates; It is the homography matrix between the camera and the device plane, derived from the calibration process after the device is installed. The original source of this formula is the pinhole imaging model. When the PCB working surface satisfies planar constraints, spatial points can be written as planar points, and the first two columns of the rotation matrix and the translation vector can be incorporated into the intrinsic parameter matrix to obtain the homography matrix form from the plane to the image, i.e. Therefore, the above formula is not a newly created mapping relationship, but rather a specific implementation of the classical imaging model under the planar conditions of the device in this application. Both the left and right sides of the formula are represented by homogeneous coordinates, and the objects of calculation are consistent; when the result is obtained... Then, normalize the first two terms to obtain the unique pixel center position. For example, a certain path segment contains twenty consecutive trajectory points, where the planar position of the middle trajectory point is taken as... The homography matrix obtained by calibration takes the value of After substituting, we can get ;

[0034] at this time After normalization, the center position of the path segment in the image is obtained as follows: This result was then used directly for image window cropping.

[0035] After obtaining the center pixel position, the local image window is formed using the fixed-length window cropping method most commonly used in digital image processing, which originates from image matrix indexing and local receptive field extraction. Since the effective visual information near the edge of the panel is mainly concentrated in the neighborhood of the tool cutting trajectory, a fixed window is used to surround it. Extracting local images can reliably preserve information needed for subsequent analysis, such as edge sections, burr expansion, and local edge chipping. The specific syntax is as follows:

[0036] ;

[0037] in, It is the first Each path segment corresponds to a local image window, the value of which comes from the indexed local submatrix of the original image matrix. This indicates matrix indexing of the original plate-splitting result image; the original image... Output from the industrial camera and stored in the industrial computer's cache; and It is the position of the center pixel that has already been obtained from the previous formula; and This is the half-width parameter of the window in both directions, preset during equipment debugging, used to control the extraction area's coverage of the cutting edge and its neighborhood. This formula is directly derived from the previous one: the previous formula gives the image center position corresponding to the center of the path segment, and the latter formula extracts the local image around this position using a fixed window; therefore, the two are continuous, not parallel. The left side of the formula is the local image matrix, and the right side is the local image matrix obtained by indexing the original image matrix; the two objects are the same. Continuing with the previous example, if... and take , Then the local image window of that path segment is the row interval in the original image. Column interval The corresponding submatrix. This is how we obtain... The entire area is covered after cutting, including the edge and its neighborhood. After performing the same calculation on each segment along the entire machining path, a sequence of local image windows arranged in path order is formed. ,in This represents the total number of path segments, derived from the segmentation results of the control system's analysis of the current processing trajectory. It is the direct input for the subsequent formation of path quality status. It has transformed the original plate image from a "whole observation object" into a "segment-by-segment path result object", and each subsequent quality change can be accurately traced back to the specific processing segment.

[0038] The quality state calculation module is used to perform classical Sobel convolution on the local image window to generate a gradient matrix, then calculate the principal direction of the gradient vector at the center of the local image window, define the local normal of the current continuous path segment based on the principal direction, and project and average the gradient magnitude of the local image window along the tangential direction based on the local normal to obtain a one-dimensional edge response sequence. Based on the one-dimensional edge response sequence, the edge center position of the current continuous path segment is calculated, and the path quality value of the current continuous path segment is calculated based on the edge center position. A path quality characterization is constructed based on the path quality of all continuous path segments, specifically including:

[0039] The quality state calculation module constructs a visual representation of the results along the local image window. Expand segment by segment. Output of the local image window construction module. The entire panel separation result image has been rearranged into a sequence of local image windows arranged according to the processing path. Therefore, the quality status calculation module no longer processes the entire panel image, but directly processes the local image window corresponding to each path segment. This process establishes a quality state. The quality state here is not the texture features commonly found in image processing, but rather a construct built around the most sensitive edge processing results in PCB depaneling scenarios. Specifically, it corresponds to three types of phenomena: the drift of the edge center relative to the ideal cutting position, the outward expansion of the cutting edge, and the edge response dispersion caused by local edge chipping. To compress these three phenomena into a single quantized result arranged along the path, this step first transforms the two-dimensional local image into a one-dimensional edge response along the path normal, then extracts the edge center position from this one-dimensional edge response, and finally combines the edge center position offset and the edge response dispersion to form the path quality value. The reason for this design is that during PCB depaneling, tool wear first manifests as the offset of the edge main response position along the normal direction. As wear continues, it manifests as burrs and chipping, causing the edge response to widen. Therefore, "center position" and "discrete width" are closer to the actual processing state than simple edge strength.

[0040] In actual processing, the industrial control computer reads sequentially from the cache. Each All of these originate from local image windows extracted around the center of the path segment in the local image window construction module; therefore, the central region of the window is the main cutting edge region of the current segment. Subsequently... Perform a classic Sobel convolution to obtain the gradient matrices in the horizontal and vertical directions; then, calculate the principal direction of the gradient vector within the central strip region of the window, and define the direction perpendicular to this principal direction as the local normal of the current path segment. Based on this normal coordinate, ... The gradient magnitudes are projected and averaged along the tangential direction to obtain a one-dimensional edge response sequence. .in, Each discrete value comes from The average gradient magnitude at the corresponding normal position. This represents the discrete position index along the local normal, with the zero point corresponding to the center of the local image window in the local image window construction module. Since the image window is already bound segment by segment to the processing path in the local image window construction module... The path location attributes are naturally inherited. At this point, each path segment is compressed into a normal edge response curve: the position of the main response peak represents the edge center, the response width represents the edge diffusion, and a double peak or skewed response corresponds to edge chipping or burr expansion. This representation directly serves the next step of wear effect identification, because the effect of wear on the PCB delamination edge is presented through these normal geometric changes.

[0041] Edge center position The edge center function is calculated and generated using a "weighted centroid plus path continuity constraint" notation. Its origin consists of two parts: the first is a mathematical formula for the weighted centroid of a discrete distribution's center position, and the second is the adjacent term constraint from classical least-squares smoothing. The weighted centroid can be calculated based on... The distribution of strength and weakness gives the center position of the main response at the edge of the current segment; the adjacent term constraint utilizes the fact that the edge positions of adjacent segments on the same path change continuously, making the calculation results more consistent with the actual plate-separating process. Combining these two parts, we can write about The target quantity is:

[0042] ;

[0043] The first term originates from minimizing the weighted squared error, and the second term originates from the smoothing constraint of adjacent segments. For the first path segment, the edge center position is directly taken as the weighted centroid of the one-dimensional edge response of the current segment, i.e. ;; For the first Internal path segments, among which ,right Taking the derivative and setting it to zero, we obtain a closed-form solution for the edge center location. The expression for the edge center function is:

[0044] ;

[0045] in, Indicates the first The edge center position of each path segment, its value is determined by the one-dimensional edge response of the current segment. and the center position of the edge of the previous section Calculated together; Indicates the first Each path segment is in the normal position The edge response strength at that point, its value comes from Discrete results after Sobel convolution, principal direction estimation, normal resampling, and tangential averaging; This represents a discrete position index along the local normal direction. Its value is determined by the size of the image window in the local image window construction module, with the center of the window as the reference zero point. This represents the path continuity constraint weight. Its value comes from the statistical settings of normal cutting samples and wear samples during the equipment commissioning phase, and is used to control the degree of inheritance of the center position of adjacent sections. This represents the edge center position of the preceding adjacent path segment, and its value comes from the calculation result of the previous segment on the same path. The left and right sides of this formula describe the same edge center position. Using normalized normal coordinates, then It only participates in the weighted sum as a weight, and the result obtained after dividing the numerator by the denominator is... It is still a normal position quantity, therefore the expression is self-consistent. Taking a certain segment as an example, if the normal position is taken as... The corresponding edge response is taken The center of the previous section and take Then the molecule is The denominator is Thus obtain This result indicates that the actual cutting edge master response center of the current path segment has undergone a slight normal offset relative to the local window center.

[0046] In obtaining Next, path quality value The quality function is calculated and generated using a weighted combination of a center offset term and an edge discrete term. This approach originates from geometric offset metrics and the mean absolute deviation in statistics. The center offset term reflects the deviation of the current path segment's edge main response from the ideal cutting position, while the edge discrete term reflects the widening of the edge response caused by burr expansion and edge chipping. Since the deterioration of PCB delamination edge quality usually manifests in both aspects simultaneously, using the same quality value for both is more suitable for subsequent comparisons of wear effects along the path. Each local image window in the local image window construction module... All are intercepted around the theoretical cutting edge reference point of this path segment, therefore the position of this theoretical cutting edge reference point in the local normal coordinate system is denoted as... When the window is symmetrically cropped with respect to this reference point, Taking the normal zero point, the mass function can be written as:

[0047] ;

[0048] in, Indicates the first The quality status value of each path segment is obtained by combining the edge center offset and the edge diffusion degree. This represents the weighting coefficient of the two parts. Its value comes from the fitting settings of normal edge samples and worn edge samples during the equipment commissioning phase. It is used to balance the proportion of edge position offset and edge dispersion in quality evaluation. This indicates the center position of the edge of the current segment, and its value is calculated by the previous formula; This indicates the reference center position of the current local image window, and its value is determined by the local image window building module. The center of the window is determined and set to zero in the normalized normal coordinate system; and Using the definition from the previous formula; the fractional part represents the current segment edge response with respect to the center position. The weighted average absolute deviation is such that the larger the value, the more dispersed the margins. This formula is a progressive relationship with the previous formula: the previous formula started from... Find the edge center This formula is based on Calculate the mass value Continuing with the previous example, if... , and take Then the first item is The weighted average absolute deviation in the second term is:

[0049] ;

[0050] Multiply by Later Adding the two together yields This value has integrated the outward shift of the edge center and the widening of the edge in the current path segment into a single quality state quantity.

[0051] Calculate all segments sequentially along the entire partition path to obtain... Each of them They all strictly correspond to one of the local image window construction modules. Therefore, the output of the quality status calculation module is This not only preserves the path order but also the continuous changes between segments. In PCB depaneling scenarios, this representation can uniformly project the quality differences of straight segments, corner segments, and segments near bridges onto the same path sequence, enabling the next step to revolve around... When analyzing the impact of milling cutter wear, it is no longer necessary to return to the original image for repeated localization. Instead, the magnitude and continuity of quality state changes in different path segments can be directly compared. In this way, the local image window construction module provides the visual basis for path binding, and the quality state calculation module further transforms this visual basis into a computable, comparable, and path-propagating sequence of quality states. Subsequent wear impact determination is then based on an input with clear geometric and technological meaning.

[0052] The wear compensation calculation module is used to calculate the continuous wear enhancement factor corresponding to continuous path segments based on the path quality characterization, calculate the wear compensation basis value based on the path quality characterization and the continuous wear enhancement factor, and construct a wear compensation basis sequence based on the wear compensation basis values ​​of all continuous path segments, specifically including:

[0053] The wear compensation calculation module characterizes the quality along the path formed by the quality state calculation module. Continue to unfold, each of which All have been mapped to specific path segments, and the edge center offset and edge dispersion of that segment have been compressed into the same quality state quantity. Therefore, the object processed in this step is no longer the image or edge points, but a discrete quality sequence that corresponds one-to-one with the actual PCB depaneling path. For the milling cutter wear scenario of PCB depaneling machines, this input format has direct process significance because milling cutter wear will not only manifest randomly in a single segment, but will accumulate segment by segment along the path as the cutting progresses, slowly increasing in long straight segments, accelerating at corners, bridging points, and segments with sudden changes in local resistance, and continuing to maintain this level in subsequent segments. Therefore, the generation of wear compensation criteria should not use single-point threshold judgment, but should instead... Treating it as a discrete path signal, the local quality amplitude, the continuous increment of adjacent segments, and the propagation relationship between consecutive segments are extracted simultaneously along the path direction. These factors are then combined to form the final basis for wear compensation. This is how it was obtained. It can naturally serve as a direct input for the next step of automatic compensation in subsequent processing, because it is no longer just "how much quality deviation there is in the current section", but a quantitative result of "how much compensation intensity the current section should bear under the background of wear evolution along the entire path".

[0054] The continuous wear characteristics along the path are first extracted through local three-point trends. The basic idea here comes from the joint analysis of local slope and discrete curvature in discrete signal processing: the first-order difference is used to describe the trend of signal change along the path, and the second-order difference is used to describe whether the trend of change is continuously amplified. For PCB depaneling scenarios, this application further combines these two classic quantities into a continuous wear enhancement factor. Its function is to distinguish between "adjacent segments that are continuously rising in the same direction" and "single-point spikes or fluctuations that cancel each other out." For internal path segments, among which... Let the mass states before and after this section be respectively. , and The forward increment is The backward increment is If the two increments have the same sign, it indicates that the segment is within a path of continuous deterioration or continuous recovery; if they have opposite signs, it indicates that the segment is closer to a localized sporadic anomaly. To avoid numerical amplification caused by using only the increment product, this application introduces a local total swing amplitude for normalization, thereby obtaining the wear enhancement function, the expression of which is:

[0055] ;

[0056] in, Indicates the first The continuous wear enhancement factor for each path segment is determined by the combined mass increments of the two adjacent segments before and after the current segment. Indicates the first The quality status values ​​of each path segment are derived from the path quality representation output by the quality status calculation module. and These represent the quality status values ​​of adjacent path segments, respectively, derived from the quality status calculation module of adjacent segments on the same path; This represents a small positive number in the normalization process. Its value is fixed during equipment debugging to ensure the denominator remains stable even when the local amplitude is very small. The original source of this formula can be traced back to the determination of local slope products and amplitude normalization in discrete signal analysis. The modification made in this application is to use the product of the increments on both sides as the core of the persistence judgment and to use the total amplitude of the preceding and following segments as the normalization term, so that the result simultaneously possesses trend consistency and local amplitude adaptive capability. If the quality state of three consecutive segments along the path is taken as... , , and set The forward increment is The backward increment is The total local swing amplitude is After substituting, we can get A positive value indicates that the segment is within a continuously deteriorating segment. If another position is taken... , , The forward increment is The backward increment is After substitution Negative values ​​typically correspond to localized chipping points, chip obstruction, or transient disturbances in the manufacturing process, rather than stable wear propagation. For boundary sections, take... , And proceed directly to the next step. and The boundary update rules. The left and right sides of the equation are scalar state variables on the path segment, involving... and They are all located in the same discrete path signal space, and their computational relationship is self-consistent.

[0057] get Next, this step further generates wear compensation criteria along the entire path using a wear compensation function. This updated formula originates from the idea of ​​discrete regularized least squares, and its basic form is that "the result should be close to the current observation and remain continuous along the path." In this application, the current observation is obtained by the mass state calculation module. Path continuity is achieved through adjacent segments. and Expression; Meanwhile, in order to ensure that the continuously worn section can maintain a high response after replacement, this application uses the above formula to obtain... Write to In the fidelity term, continuously deteriorating sections are made relatively closer to the original quality state, while local isolated spikes are more subject to path smoothing constraints. If each section... The target quantity is written as ,in express The positive part, then for Taking the partial derivative and setting it to zero, we can obtain the wear compensation function as follows:

[0058] ;

[0059] in, Indicates the first The wear compensation base value for each path segment will directly enter the next automatic compensation action generation; This represents the quality status value of the current segment, derived from the path quality representation output by the quality status calculation module. and These represent the wear compensation base values ​​for adjacent path segments, which are provided by the results of the previous round during the iterative update process in this step; This represents the path continuity constraint weight, the value of which is set during the equipment commissioning phase based on the smoothness of the compensation transition along the path; This indicates the weighting for continuous wear enhancement, and its value is determined by the differentiation effect between continuous cutting samples and local occasional abnormal samples. express The positive part, that is, when Time to take It is either zero or zero, used only to enhance continuously deteriorating segments. The derivation logic of this formula is clear: the first term in the objective quantity requires... Without deviating from the current section's quality status, the second requirement... The third requirement is that the path direction remains smooth with adjacent segments, and that the local trend shows a continuous deterioration. right Maintain stronger following. After differentiating the above objective quantity, regarding... The coefficient of the first term is The coefficient of the quadratic term is After simplification, the above equation is obtained. Therefore, this update equation is not an empirical construct, but a closed-form result with a clearly defined objective function. Both sides of the equation describe the compensation basis scalars on the path segment. The numerator and denominator on the right side are composed of the same type of path state variables and dimensionless weights, maintaining consistency in expression. In actual solution, the boundary segment is taken. , The middle section is Using the initial values, iterating sequentially along the path for three to five rounds will lead to convergence. Continuing with the previous values, if a certain internal segment is taken... , , The previous equation has already been calculated. ,therefore Let the current iteration value of the adjacent segment be... , and take , Then the molecule is The denominator is Thus obtain If another isolated anomalous segment If it is negative, then In the same Down, More from the current and adjacent Through mutual balance, local sharp peaks are naturally suppressed along the path. During continuous cutting debugging, the speed of several segments along the same path can be recorded. and the iterative The comparison revealed a continuously deteriorating segment The elevation remains smooth between adjacent sections, while local isolated anomalies are observed. It will fall back to a level closer to the path background, which corresponds to the propagation characteristics of milling cutter wear in the actual plate separation process.

[0060] After completing the above update along the entire board path, the wear compensation basis sequence is obtained. This sequence inherits segment by segment from the mass state calculation module. The path location attributes are then superimposed with two layers of information: continuous degradation identification and path smoothing propagation. Therefore, in the next step of generating automatic compensation actions for subsequent processing, It can be directly used as the basis for compensation intensity in the corresponding path segment. For long straight sections, corner sections and sections near bridge connections in PCB board separation, this basis generation method can distinguish between local quality deterioration and wear effects that continue to spread along the path, making the compensation action more consistent with the actual wear distribution when it is carried out along the path.

[0061] The compensation execution module is used to read the sequence of processing trajectory points corresponding to continuous path segments, calculate the tangential direction vector, map the wear compensation basis sequence to a normal compensation amplitude sequence, and correct the processing trajectory point sequence based on the normal compensation amplitude sequence, specifically including:

[0062] The compensation execution module follows the wear compensation basis sequence formed by the wear compensation calculation module. The process is directly executed, and the sequence is mapped segment by segment to the actual trajectory correction amount in the PCB splitter control system. The wear compensation calculation module has already characterized the path quality. Transform into a wear compensation basis with path continuity semantics Therefore, this step no longer involves image or quality calculations, but rather focuses on how to... This is transformed into the spatial position correction and unfolding of the tool within the corresponding path segment. When a PCB depaneling machine performs processing, its trajectory is essentially a sequence of discrete coordinate points generated by the control system, with each path segment... This corresponds to a set of continuous trajectory points. The effect of tool wear on the machining result can be geometrically understood as a reduction in the equivalent radius of the tool or a dulling of the cutting edge, which causes the actual cutting trajectory to deviate from the ideal trajectory. Therefore, this error can be directly compensated by correcting the normal direction of the trajectory points.

[0063] For each path segment, the control system first reads the set of trajectory points for that segment and calculates the tangential direction vector of that segment based on the coordinate difference between adjacent trajectory points. This vector originates from the approximate expression of the curve tangency in discrete geometry, that is, using the difference in coordinates of adjacent points to represent the local tangent direction. Let the coordinates of two consecutive trajectory points within a certain path segment be... and Then the tangential direction can be expressed as Then, the unit tangential direction is obtained through vector normalization. Based on the orthogonality of vectors in plane geometry, rotating this unit tangential direction by 90 degrees yields the unit normal direction. Let the unit tangential direction be... When the path segment corresponds to the outer contour cutting, the unit normal is fixed. When the path segment corresponds to the inner contour cutting, the unit normal is fixed. The outer and inner contour attributes are given by the contour type marker in the process file and written into the control system when the path segment is generated.

[0064] After obtaining the normal direction, the wear compensation basis obtained from the wear compensation calculation module needs to be... Mapped to the actual compensation amplitude This mapping relationship stems from the empirical law governing the impact of tool wear on cutting width: when wear is minimal, the compensation amount is approximately linearly related to the degree of wear; as wear gradually worsens, continued linear amplification of compensation leads to overcutting, therefore the compensation amount should gradually stabilize. Based on this law, Substituting this into the rational function saturation model, which is often used in control theory to smoothly limit the input quantity to its maximum range, its form is:

[0065] ;

[0066] in, Indicates the first The normal compensation amplitude of each path segment is used to correct the spatial position of all trajectory points in that segment. This indicates the wear compensation basis value for this path segment, which comes from the calculation results of the wear compensation calculation module; This indicates the maximum allowable compensation amplitude, which is set during the equipment commissioning phase based on the tool diameter, tolerance requirements, and PCB thickness. This represents the transition parameter, the value of which controls the rate at which compensation transitions from linear growth to saturation. This formula is derived from the classical saturation function. Based on this, this application introduces a proportionality coefficient. This ensures that the output directly corresponds to the compensation amplitude in actual processing. In the formula... Indicates the first Wear compensation for each path segment is based on scalar values. This represents the normal compensation amplitude obtained from the mapping, and a one-to-one correspondence is established between the two through saturation mapping; where Proceed directly to trajectory correction calculation. If a certain segment is taken... and set , ,but This indicates that the path segment should be offset approximately along the normal direction. The value of.

[0067] Obtain the compensation amplitude Then, this is applied to every trajectory point within the path segment. Specifically, this is done in the interpolation module of the CNC system, where a correction calculation is performed on the trajectory point coordinates. Let the original coordinates of a trajectory point be... Its corresponding normal unit vector is The corrected coordinates of the trajectory points are:

[0068] ;

[0069] This update relationship originates from planar vector addition, where the original position vector is superimposed with the normal offset vector to obtain the new position. Here... The original trajectory output from the PCB depaneling machine control system. Direction calculation from this path segment Since the compensation amplitude calculation comes from the previous step, all variables are derived from actual device data or previous calculation results. For a path segment containing several trajectory points, the above correction is performed point-by-point, thus forming a trajectory after overall translation within that segment.

[0070] In actual processing, compensation between path segments needs to maintain continuity. This is because the wear compensation calculation module... Smoothing has already been performed using path continuity constraints, therefore The change between adjacent segments is gradual. This can be illustrated by a set of examples on a continuous path: if a certain three consecutive segments... They are respectively , , ,exist , Under the conditions, the corresponding They are respectively , , As can be seen, the compensation amount gradually increases along the path without any abrupt changes. This gradual change manifests as a smooth outward or inward expansion of the toolpath after trajectory correction, thus avoiding the introduction of new edge breaklines or local vibrations during machining.

[0071] During debugging, the effectiveness of this method can be verified by performing multiple processing experiments on the same PCB before and after compensation. Record the data for each path segment. and By comparing the edge deviations before and after compensation, it can be observed that: in sections with significant wear, the edge deviation is significantly reduced after compensation; in sections with previously good quality, the compensation amount is small, and the impact on the original edge morphology is limited. Through statistical analysis of multiple batches of samples, the average reduction in edge deviation before and after compensation can be obtained, thus verifying the effectiveness of the compensation model in actual production.

[0072] Through the above process, the compensation execution module will base the wear compensation on... Converted into specific trajectory correction quantities This information is then applied to the machining trajectory of the depaneling machine, achieving a direct closed loop from wear identification to machining control. The entire process unfolds segment by segment along the path, ensuring that the compensation is both locally targeted and consistently applied throughout the entire path, thereby effectively offsetting machining errors caused by milling cutter wear.

[0073] The above embodiments are merely descriptions of preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made by those skilled in the art to the technical solutions of the present invention without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.

Claims

1. A machine vision-based online detection and automatic compensation system for milling cutter wear on PCB depaneling machines, characterized in that, include: The local image window construction module is used to acquire images of the PCB depaneling machine at the depaneling edge and cutting neighborhood, as well as the processing trajectory point sequence. The processing trajectory point sequence is divided into multiple continuous path segments, and each continuous path segment is mapped onto the image. The position of the theoretical cutting edge reference point in the equipment plane coordinate system is mapped to the center pixel position in the image. Based on the center pixel position, the local image window of the continuous path segment on the image is extracted. The quality state calculation module is used to perform classical Sobel operator convolution on the local image window to generate a gradient matrix, then calculate the main direction of the gradient vector at the center of the local image window, define the local normal of the current continuous path segment based on the main direction, and project and average the gradient magnitude of the local image window along the tangent based on the local normal to obtain a one-dimensional edge response sequence. Based on the one-dimensional edge response sequence, the edge center position of the current continuous path segment is calculated, the path quality value of the current continuous path segment is calculated based on the edge center position, and a path quality characterization is constructed based on the path quality of all continuous path segments. The wear compensation calculation module is used to calculate the continuous wear enhancement factor corresponding to the continuous path segment based on the path quality characterization, calculate the wear compensation basis value based on the path quality characterization and the continuous wear enhancement factor, and construct the wear compensation basis sequence based on the wear compensation basis values ​​of all continuous path segments. The compensation execution module is used to read the sequence of processing trajectory points corresponding to continuous path segments, calculate the tangential direction vector, map the wear compensation basis sequence to the normal compensation amplitude sequence, and correct the processing trajectory point sequence based on the normal compensation amplitude sequence.

2. The online detection and automatic compensation system for milling cutter wear on PCB depaneling machines based on machine vision as described in claim 1, characterized in that, The edge center position is generated by calculating the edge center function. The parameters of the edge center function include a one-dimensional edge response sequence, a discrete position index in the local normal direction, a path continuity constraint weight, and the edge center position of the previous adjacent continuous path segment. The one-dimensional edge response sequence represents the edge response intensity of the continuous path segment at the normal position.

3. The online detection and automatic compensation system for milling cutter wear on PCB depaneling machines based on machine vision as described in claim 1, characterized in that, The path quality value is generated by calculating a quality function, the parameters of which include weighting coefficients, the edge center position of the local image window, and the reference center position of the local image window.

4. The online detection and automatic compensation system for milling cutter wear on PCB depaneling machines based on machine vision according to claim 1, characterized in that, The continuous wear enhancement factor is calculated and generated through a wear enhancement function, the parameters of which include path quality value, quality status value of adjacent continuous path segments, and small positive numbers in the normalization.

5. The online detection and automatic compensation system for milling cutter wear on PCB depaneling machines based on machine vision according to claim 1, characterized in that, The wear compensation baseline value is calculated and generated through a wear compensation function. The parameters of the wear compensation function include the quality status value, the wear compensation baseline value of adjacent continuous path segments, the path continuity constraint weight, and the continuous wear enhancement weight.

6. The online detection and automatic compensation system for milling cutter wear on PCB depaneling machines based on machine vision according to claim 1, characterized in that, The normal compensation amplitude is generated through a rational function saturation model, the parameters of which include the wear compensation basis value, the maximum compensation amplitude, and the transition parameter.

7. The online detection and automatic compensation system for milling cutter wear on PCB depaneling machines based on machine vision according to claim 1, characterized in that, The gradient matrix is ​​the gradient matrix in the horizontal and vertical directions.

8. The online detection and automatic compensation system for milling cutter wear on PCB depaneling machines based on machine vision according to claim 1, characterized in that, The center pixel position is generated by a homogeneous transformation function. The parameters of the homogeneous transformation function include the position value of the theoretical cutting edge reference point of the continuous path segment in the device plane coordinate system, the scaling factor in the homogeneous coordinates, and the homography matrix between the camera and the device plane.

9. The online detection and automatic compensation system for milling cutter wear on PCB depaneling machines based on machine vision according to claim 1, characterized in that, The theoretical cutting edge reference point is calculated by combining the tool center trajectory point with the current tool position offset.

10. The online detection and automatic compensation system for milling cutter wear on PCB depaneling machines based on machine vision according to claim 1, characterized in that, The step of reading the sequence of processing trajectory points corresponding to continuous path segments and calculating the tangential direction vector specifically includes: Read the sequence of processing trajectory points corresponding to the continuous path segment; The tangential direction vector of the continuous path segment is calculated based on the coordinate difference between adjacent trajectory points in the processing trajectory point sequence.