PCB laser drilling deviation detection method and system
By processing images and analyzing equipment parameters of the laser drilling area on the PCB board, a precise deviation vector is generated, which solves the problem of misjudgment in laser drilling deviation detection and achieves high-precision and high-efficiency deviation detection.
Patent Information
- Application Number
- CN202511712941.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-20
- Publication Date
- 2025-12-26
AI Technical Summary
Existing laser drilling technology on PCBs is easily affected by fluctuations in equipment parameters and differences in material properties, leading to drilling misalignment. Existing detection methods have a high false judgment rate and cannot meet the accuracy requirements of high-density PCBs.
By acquiring raw image data, standard borehole coordinate data, and equipment operating parameters, noise suppression and illumination equalization are performed, edge contour features are extracted, and a deviation influence factor matrix is constructed in combination with equipment parameters. Weight coefficients are calculated, and a precise deviation vector is generated to determine borehole deviation.
It improves the reliability and accuracy of borehole deviation detection data, reduces the false judgment rate, enhances detection efficiency and adaptability, and provides targeted correction guidance.
Smart Images

Figure CN121213541A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of quality detection, in particular, to a PCB laser drilling deviation detection method and system. BACKGROUND
[0002] At present, laser drilling technology has become the mainstream means for PCB micro-hole processing due to its high processing efficiency and strong controllability of hole diameter. However, the processing process is easily affected by factors such as equipment parameter fluctuation and material property difference. Once drilling deviation occurs, it will directly lead to PCB signal transmission failure, multi-layer board conduction failure, and even cause the whole board to be scrapped. The existing method mainly obtains the deviation between the drilling contour and the design drawing through artificial microscope observation or simple image comparison, and then judges whether there is deviation according to the fixed threshold. However, the existing method is affected by insufficient processing of original image noise, ignoring laser power fluctuation, feed speed change and other equipment operation parameters. The deviation result obtained by relying only on image comparison is prone to misjudgment, and cannot accurately reflect the actual deviation degree. At the same time, the weight calculation of each deviation influencing factor is lacking, which leads to the lack of pertinence of deviation correction and cannot meet the drilling deviation detection accuracy of high-density PCB, thereby reducing the detection efficiency of PCB. SUMMARY
[0003] In view of the deficiencies of the prior art, the present application provides a PCB laser drilling deviation detection method, comprising the following steps: Step S1: Obtain the original image data corresponding to the laser drilling area of the PCB, the standard hole position coordinate data in the drilling design file, and the real-time operation parameter data corresponding to the laser drilling equipment, and perform noise suppression and illumination equalization processing on the original image data to generate preprocessed image data. The standard coordinate data set is generated by performing format standardization processing on the standard hole position coordinate data. The device operation reference data set is generated by performing outlier rejection processing on the real-time operation parameter data; Step S2: Extract the edge contour feature data of the drilling area based on the preprocessed image data, determine the drilling design reference contour parameter combined with the standard coordinate data set, and calculate the initial deviation vector of the drilling actual contour and the design contour through the comparison of the edge contour feature data and the drilling design reference contour parameter; Step S3: Extract the laser power fluctuation parameter, drilling feed speed change parameter and laser spot focusing position parameter based on the device operation reference data set, construct the drilling deviation influencing factor matrix combined with the initial deviation vector, and generate the weight coefficient of each influencing factor on the drilling deviation through the drilling deviation influencing factor matrix operation; Step S4: correcting the initial deviation vector based on the weight coefficient to generate an accurate deviation vector, and calculating the offset distance and offset direction parameters of the actual center of the drilling hole from the design center according to the accurate deviation vector, combining the drilling accuracy requirement of the PCB to determine whether the drilling hole is offset, and generating a drilling hole offset detection result.
[0004] Further, the present application also provides a PCB laser drilling hole offset detection system, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, for executing the PCB laser drilling hole offset detection method as described above.
[0005] The beneficial effects of the present application are: through noise suppression and illumination equalization of the original image, the image detail blur caused by environmental interference (such as rough drilling edge misjudgment) is eliminated, and the extracted contour feature is real and reliable; the standard coordinate data format standardization avoids the problem of incompatible design file and image coordinate system, and the device operation parameter outlier rejection eliminates the interference of device sudden failure data on analysis, and generates three types of high-quality data sets, which lays a foundation for subsequent precise calculation of deviation and analysis of deviation influencing factor, reduces the detection misjudgment caused by data problems from the source, and improves the pre-data reliability of PCB drilling deviation detection. Secondly, by combining the standardized standard coordinate data set to determine the design reference contour parameter, it is ensured that the comparison reference and design requirements are completely consistent, and the comparison deviation caused by the difference of coordinate system is eliminated; by quantitatively comparing the contour feature and the design reference, the initial deviation vector is generated, the abstract "deviation" is converted into a specific numerical vector (such as X-axis offset and Y-axis offset), the precise quantification of deviation is realized, compared with the traditional method which can only judge "whether there is deviation", this step can clearly indicate the specific degree and direction of deviation, and provide quantitative basis for subsequent deviation correction, which significantly improves the preliminary accuracy of drilling deviation detection. Then, by combining the initial deviation vector to construct the influencing factor matrix, the device parameters are associated with the actual deviation, and the weight coefficient of each factor is generated by matrix operation, which can clearly indicate the influence degree of different parameters on the deviation. Compared with the traditional method which only focuses on the deviation result and does not trace the reason, this step not only quantifies the importance of influencing factors, but also provides a direction for subsequent targeted correction of deviation, avoiding the low efficiency caused by blind correction, and improving the scientificity and pertinence of deviation analysis. Finally, by correcting the initial deviation vector based on the weight coefficient of each influencing factor, the influence of device parameter interference on deviation calculation can be eliminated, and the precise deviation vector generated is more consistent with the actual deviation situation; according to the precise vector, the offset distance and direction are calculated, which provides more accurate quantitative indicators for judging deviation; combined with the specific drilling precision requirement of PCB, the deviation is judged, avoiding the problem that the traditional fixed threshold judgment is not suitable for different PCB requirements, compared with the traditional method which is prone to misjudgment and cannot meet the precision of high-density PCB, the detection result generated by this step has higher precision and stronger adaptability, which can effectively reduce the misjudgment rate, and clearly indicates the specific information of the deviation, providing clear guidance for subsequent device adjustment or rework, thereby improving the efficiency and accuracy of PCB drilling deviation detection. BRIEF DESCRIPTION OF DRAWINGS
[0006] The drawings described herein are used to provide further understanding of the present application, and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application, and do not constitute an improper limitation on the present application. In the drawings: Figure 1 The flow chart of the PCB laser drilling deviation detection method in the present embodiment; Figure 2 For Figure 1 The detailed implementation steps of step S2 are shown in a flowchart. DETAILED DESCRIPTION
[0007] The present application will be described below with reference to the drawings, in which the embodiments of the present application are disclosed. For the purpose of clear illustration, many practical details will be described in the following description. However, it should be understood that these practical details should not be used to limit the present application. That is, in some embodiments of the present application, these practical details are not necessary. In addition, for the purpose of simplifying the drawings, some conventional structures and components will be shown in the drawings in a simple schematic manner.
[0008] In order to further understand the content, features and effects of the present application, the following examples are given, and are described in detail as follows with reference to the accompanying drawings: Referring to Figure 1 , Figure 1 The flowchart of the PCB laser drilling offset detection method in this embodiment is shown. The PCB laser drilling offset detection method in this embodiment includes the following steps: Step S1: Obtain the original image data corresponding to the laser drilling area of the PCB, the standard hole position coordinate data in the drilling design file, and the real-time running parameter data corresponding to the laser drilling equipment, and perform noise suppression and illumination equalization processing on the original image data to generate preprocessed image data, perform format standardization processing on the standard hole position coordinate data to generate a standard coordinate data set, and perform outlier rejection processing on the real-time running parameter data to generate a device running reference data set; In the embodiment of the present application, 6 multi-view industrial camera arrays are used to collect the original image data (resolution 2048x2048 pixels) of the laser drilling area of the PCB (300mmx200mm, 1000 holes), the standard hole position coordinate data (such as the center of the 50th drilling design circle (100, 200) mm) is retrieved from the drilling design file, and the real-time running parameter data (laser power 14-16W, feed motor speed 100-120r / min, focusing displacement -0.1-0.1mm) is collected from the laser drilling equipment. The original image is suppressed by adaptive median filtering (3x3 / 5x5 window) to suppress salt and pepper and Gaussian noise, and the illumination is adjusted by Retinex algorithm (the gray scale of the overexposed area is reduced from 145 to 125, and the insufficient area is increased from 85 to 105) to generate preprocessed image data; the standard hole position coordinate is standardized according to the "drilling number-x coordinate-y coordinate" format to generate a standard coordinate data set; and the real-time running parameter is subjected to 3σ criterion to eliminate outliers (such as power 18W, speed 80r / min) to generate a device running reference data set.
[0009] Step S2: Extract the edge profile feature data of the drilling area based on the pre-processed image data, determine the drilling design reference profile parameters combined with the standard coordinate data set, and calculate the initial deviation vector of the drilling actual profile and the design profile through the comparison of the edge profile feature data and the drilling design reference profile parameters; In the embodiment of the present application, by constructing a 5-layer Gaussian pyramid (scale factor 1.2) on the pre-processed image, using Canny operator (high threshold 80, low threshold 40) to extract the edge, and through non-maximum suppression and cross-scale fusion to obtain the drilling edge profile feature data (110 edge points of the 50th drilling), the design center (100, 200) mm (converted to image pixels (500, 500)) of the drilling, the design radius 4.22 mm (42.2 pixels), and the allowed deviation 0.5 pixels are extracted from the standard coordinate data set to construct the design reference circle profile. The iterative closest point algorithm is used to register the actual profile and the design profile, and the Euclidean distance of 110 pairs of registration points (range 1.8-2.5 pixels) is calculated to generate the initial deviation vector (e.g. 0°-2.2 pixels, 3.27°-2.1 pixels).
[0010] Step S3: Based on the device operation reference data set, extract the laser power fluctuation parameters, drilling feed speed change parameters and laser spot focusing position parameters, construct the drilling deviation influence factor matrix combined with the initial deviation vector, and generate the weight coefficient of each influence factor on the drilling deviation through the drilling deviation influence factor matrix operation; In the embodiment of the present application, by extracting the laser power fluctuation parameters (compensated amplitude 1.8955 W, period 0.50125 s), drilling feed speed change parameters (corrected change rate 0.2 mm / min), and laser spot focusing position parameters (average offset 0.005000375 mm) from the device operation reference data set, taking the three parameters as row vectors and the x-axis (0.022 pixels) and y-axis (0.012 pixels) components of the initial deviation vector as column vectors, a 3x2 influence factor matrix [[0.72, 0.65], [0.48, 0.51], [0.81, 0.78]] is constructed by calculating the Pearson correlation coefficient. The matrix is decomposed (main eigenvalue 1.42, eigenvector [0.32, 0.25, 0.43]) combined with the actual contribution degree (focusing 45%, power 30%, feed 25%) of the historical 1000 groups of data to iteratively optimize and generate the weight coefficients: power 0.30, feed 0.25, focusing 0.45.
[0011] Step S4: Based on the weight coefficients, the initial deviation vector is corrected to generate a precise deviation vector, and the offset distance and offset direction parameters of the drilling actual center and the design center are calculated according to the precise deviation vector. Combined with the PCB drilling precision requirement, it is judged whether the drilling exists deviation, and the drilling deviation detection result is generated.
[0012] In the embodiment of the application, the initial deviation vector is corrected based on the weight coefficient, and the correction formula is "accurate deviation = initial deviation x (1-power weight x power fluctuation amplitude / 10-feed weight x speed change rate / 10-focus weight x focus offset / 0.1)". The initial x-axis deviation of the 50th drilling hole is 2.2 pixels, and the accurate deviation is calculated as 2.2 x (1-0.30 x 1.8955 / 10-0.25 x 0.2 / 10-0.45 x 0.005000375 / 0.1) ≈ 2.2 x 0.937 ≈ 2.061 pixels. The offset distance between the actual center and the design center is calculated as √(2.061 2 + corresponding y-axis accurate deviation 2 ) ≈ 2.3 pixels, and the offset direction is 15° (according to the deviation vector angle statistics). The drilling hole offset exceeds the threshold value, and the drilling hole is determined to be offset, and a detection report containing the offset distance, direction and determination result is generated.
[0013] Further, the generating of the pre-processed image data in step S1 includes the following steps: Step S101: synchronously collecting the original images corresponding to the laser drilling area of the PCB from the front, side and oblique angles of the PCB by a multi-view industrial camera array, and correcting the original images collected from each view angle to fuse and splice the multi-view corrected images by image registration technology to generate original image data covering the whole drilling area of the PCB; In the embodiment of the application, six multi-view industrial camera arrays are used to collect images of the laser drilling area of the PCB, the size of the PCB is 300 mm x 200 mm, the drilling diameter is 0.2 mm, and there are 1000 drilling holes. The cameras are arranged as one front camera (perpendicular to the center of the PCB), four side cameras (tilted at 45° along the four edges of the PCB), and one oblique camera (tilted at 60° along the diagonal), each camera has a resolution of 2048 x 2048 pixels, and the original images are synchronously collected. The distortion parameters (radial distortion coefficients k1=-0.01, k2=0.002, tangential distortion coefficients p1=0.001, p2=-0.0005) of each camera are obtained by a chessboard calibration plate, and the pixel coordinates are adjusted by substituting the distortion correction formula to eliminate lens distortion. The image registration technology based on feature points is used to extract the drilling edge feature points (50 in each image), calculate the registration matrix, map the side and oblique images to the front image coordinate space, and fuse the overlapping areas by weighted average (drilling edge overlapping area weight 0.6, non-edge area weight 0.4) to generate 3000 x 2500 pixel original image data, which completely covers all drilling areas of the PCB.
[0014] Step S102: When performing noise suppression processing on the original image data, an adaptive median filtering algorithm is used to identify salt and pepper noise and Gaussian noise regions in the original image, and the filter kernel size and smoothing coefficient are set for different noise types to reconstruct the pixels in the corresponding noise regions to generate a preliminary denoising image. In the embodiment of the present application, by using the adaptive median filtering algorithm to process the original image data, the initial size of the filter window is set to 3x3 and the maximum size is set to 5x5. The image pixels are traversed, the standard deviation of the gray values in the window is calculated, if the standard deviation > 20, it is determined as a salt and pepper noise region (such as isolated bright spots on the edge of the drill hole, gray value 255), the window is expanded to 5x5, and the median value of the non-extreme pixels in the window is used to replace the noise pixels (such as the window gray value [255, 120, 122, 118, 125, 119, 121, 123, 124], the median value 122 replaces 255); if the standard deviation ≤ 20, it is determined as a Gaussian noise region (such as the gray fluctuation in the background region), the 3x3 window is maintained, the average value of the pixels in the window and the smoothing coefficient 0.8 are calculated, and the pixel is reconstructed according to "corrected gray value = average value × 0.8 + original gray value × 0.2" (such as original gray value 115, average value 120, corrected gray value 119). After processing, the proportion of salt and pepper noise pixels is reduced from 0.8% to 0.05%, the standard deviation of Gaussian noise is reduced from 15 to 5, and a preliminary denoising image is generated.
[0015] Step S103: When performing light balance processing on the preliminary denoising image, the light distribution characteristics of the image are analyzed by gray histogram analysis to determine the areas with excessive light and insufficient light, and the Retinex algorithm is used to adjust the pixel gray values in different light areas to make the overall gray distribution of the image uniform to generate preprocessed image data.
[0016] In the embodiment of the present application, by drawing a gray histogram of the preliminary denoising image, it is found that the gray values are concentrated in the interval of 80-150, among which the proportion of the area with excessive light (gray value > 140) is 12% (the edge reflection area of the PCB board), and the proportion of the area with insufficient light (gray value < 90) is 15% (the shadow area at the bottom of the drill hole). By using the Retinex algorithm, the image is decomposed into a reflection component and a light component. For the area with excessive light, the weight of the light component is reduced to 0.3 and the weight of the reflection component is 0.7 (such as original gray value 145, adjusted to 125); for the area with insufficient light, the weight of the light component is increased to 0.6 and the weight of the reflection component is 0.4 (such as original gray value 85, adjusted to 105). After processing, the average gray value of the image is 120, the variance is 40, the gray distribution interval is changed to 100-140, the gray difference between the areas is reduced, and the preprocessed image data is generated, the contrast between the drill hole edge and the background is improved by 20%, which is convenient for subsequent offset detection.
[0017] Further, as an embodiment of the present application, referring to Figure 2 , aFigure 1 The detailed step flowchart of step S2 is shown in the embodiment. Step S2 includes the following steps: Step S21: Constructing a multi-scale Gaussian pyramid to perform scale space decomposition on the preprocessed image data, calculating the gradient amplitude and gradient direction of the image at different scale levels using a Canny edge detection operator, and screening out candidate edge points at each scale through non-maximum suppression; In the embodiment of the present application, the preprocessed image data (3000x2500 pixels) is decomposed in scale space by constructing a 5-layer multi-scale Gaussian pyramid, with a scale factor of 1.2 for each layer, the first layer (original scale), the second layer (1.2 times scaling)…the fifth layer (1.2 4 times scaling). At each scale level, a Canny edge detection operator is used, with a high threshold of 80 and a low threshold of 40, to calculate the gradient amplitude (e.g. the gradient amplitude of a borehole edge pixel is 120, and the background pixel is 20) and the gradient direction (0-360°, quantized with an interval of 10°). Through non-maximum suppression, the local maximum value pixels in the gradient direction are retained, and the non-maximum value pixels (e.g. the pixel with a gradient amplitude of 120 is retained, and the adjacent pixel with a gradient amplitude of 100 is removed) are removed. At each scale level, 200-300 candidate edge points are screened out, and a total of 1200 candidate edge points are screened out at 5 layers.
[0018] Step S22: Cross-scale fusion of candidate edge points at different scales to connect discrete candidate edge points into continuous edge contours, and eliminate small breaks and burrs in the edge contours through morphological closing operation to generate edge contour feature data of the borehole region; In the embodiment of the present application, the candidate edge points at 5 scale levels are fused across scales, the Euclidean distance of the edge points at different scales is calculated, and the edge points with a distance less than 3 pixels are determined as the same edge point, which is merged into one feature point (e.g. the second layer (500, 300) and the third layer (498, 299) are merged into (499, 299.5)). The discrete feature points are connected into continuous edge contours using an 8-neighbor connection algorithm, and then morphological closing operation (3x3 structure element, first expansion and then corrosion) is performed to fill small breaks in the contour with a width less than 2 pixels (e.g. a 1-pixel gap in the borehole edge), and to eliminate burrs with a length less than 3 pixels (e.g. isolated edge points in the background region). Finally, the edge contour feature data of each borehole region is generated, containing 100-120 continuous edge point coordinates.
[0019] Step S23: When determining the borehole design reference contour parameters in combination with the standard coordinate data set, the design center coordinates, design radius and design hole wall flatness parameters of each borehole are extracted from the standard coordinate data set; In the embodiment of the application, by extracting the design parameters of the 50th drilling hole from the standard coordinate data set, the design center coordinates are (100, 200) (corresponding to the image pixel coordinates (500, 500)), the design radius is 4.22 mm (converted to 42.2 pixels according to the image pixel to actual size ratio of 10 pixels / mm), and the design hole wall flatness parameter is 0.05 mm (converted to 0.5 pixels). The corresponding parameters of the other 999 drilling holes are extracted, and the design parameters of each drilling hole include actual coordinates, actual radius, actual flatness parameter, and corresponding image pixel conversion value, to ensure that the uniform coordinate system is used for subsequent comparison and calculation.
[0020] Step S24: constructing a design reference circle contour of the drilling hole according to the design center coordinates and the design radius, and converting the design hole wall flatness parameter into an allowable deviation threshold of the design reference circle contour to form a drilling hole design reference contour parameter; In the embodiment of the application, by constructing a design reference circle contour according to the design center pixel coordinates (500, 500) and the design pixel radius 42.2 of the 50th drilling hole, the circle equation is (x-500) 2 +(y-500) 2 =42.2 2 . The design hole wall flatness parameter 0.5 pixels is converted into an allowable deviation threshold, and the allowable deviation threshold is set to 0.5 pixels (i.e., the distance between the actual contour point and the design contour point is less than 0.5 pixels to determine that it is qualified), to form the design reference contour parameter of the drilling hole, which includes the center coordinates, the radius, and the allowable deviation threshold. The design reference contour parameters of other drilling holes are constructed according to the same rule.
[0021] Step S25: when generating the initial deviation vector of the drilling hole actual contour and the design contour by comparing and calculating the edge contour feature data and the drilling hole design reference contour parameter, the iterative closest point algorithm is used to register the drilling hole actual edge contour feature data and the design reference circle contour, the Euclidean distance between each pair of registration points is calculated, and the Euclidean distance of all pairs of registration points and the angle information of the corresponding points are integrated into the initial deviation vector.
[0022] In the embodiment of the present application, the actual edge profile (110 edge points) of the 50th drilling hole is registered with the design reference circle profile by using the iterative closest point algorithm, the closest point of each actual edge point to the design circle is calculated in the first iteration (such as actual point (540, 500) corresponding to (542.2, 500) on the design circle), and the Euclidean distance of the registered point pair is 2.2 pixels; the position of the design circle is adjusted (the center is fine-tuned to (500.1, 500.2)) in the second iteration, and the closest point and the distance are recalculated, and the registration error is less than 0.1 pixel after 5 iterations. The Euclidean distances (range 1.8-2.5 pixels) of all 110 registered point pairs and the corresponding point angle information (0-360°, interval 3.27°) are integrated to generate an initial deviation vector, and each element of the vector is in the format of "angle-distance" (such as 0°-2.2 pixels, 3.27°-2.1 pixels), which fully reflects the deviation distribution of the actual profile and the design profile.
[0023] Further, step S23 comprises the following steps: The original vector data corresponding to the drilling hole design is called from the standard coordinate data set, and the design boundary vector information of each drilling hole is identified based on the hole position marking layer in the original vector data, and the initial profile path corresponding to the drilling hole design is generated by fitting the corner point coordinates corresponding to the design boundary vector information, and then the design center coordinates of each drilling hole are extracted according to the center point calculation rule of the initial profile path. In the embodiment of the present application, the original vector data of the laser drilling design of the PCB board is called from the standard coordinate data set, and the vector data contains a hole position marking layer (marking the boundary information of 1000 drilling holes). The design boundary vector information of each drilling hole is identified, and the boundary vector of the 50th drilling hole is taken as an example, which is composed of 8 corner point coordinates ((100, 200), (105, 200), (105, 205), (100, 205), (95, 205), (95, 200), (100, 195), (105, 195)). The least square method is used to fit the 8 corner point coordinates to calculate the initial profile path of the fitted circle (the initial center coordinates of the circle are (100, 200), and the radius is 5mm). According to the center point calculation rule of the initial profile path (the x mean value and the y mean value of all corner point coordinates), the x mean value is 100, and the y mean value is 200, and finally the design center coordinates of the drilling hole are extracted as (100, 200), and the design center coordinates of the remaining 999 drilling holes are extracted in the same way.
[0024] Further, by taking the design center coordinates of each drill hole as the reference, the contour radius annotation data corresponding to the drill hole design is extracted from the standard coordinate data set, and the radius deviation distribution parameters are calculated and generated by combining the distance deviation values of each point on the contour path to the design center coordinates, and the contour radius annotation data is corrected based on the radius deviation distribution parameters to obtain the design radius of each drill hole. In the embodiment of the present application, the design center coordinates (100, 200) of the 50th drill hole are taken as the reference, and the contour radius annotation data of 5mm is extracted from the standard coordinate data set. The distance deviation values of the 8 inflection points on the initial contour path to the design center are calculated: (100, 200) to (100, 200) distance 0mm (deviation 0), (105, 200) distance 5mm (deviation 0), (105, 205) distance 7.07mm (deviation 2.07mm), (100, 205) distance 5mm (deviation 0), (95, 205) distance 7.07mm (deviation 2.07mm), (95, 200) distance 5mm (deviation 0), (100, 195) distance 5mm (deviation 0), (105, 195) distance 7.07mm (deviation 2.07mm), to generate the radius deviation distribution parameters (maximum deviation 2.07mm, average deviation 0.776mm). Based on the parameters, the contour radius annotation data is corrected, and the correction formula is "design radius = annotation radius - average deviation", that is, 5mm-0.776mm≈4.224mm, and the design radius of the 50th drill hole is determined to be 4.22mm (retaining two decimal places), and the design radius of other drill holes is calculated by this method.
[0025] Further, the design texture density data and surface roughness annotation data of the drill hole wall are obtained from the standard coordinate data set, and the design texture density data is converted into hole wall texture distribution frequency parameters, and a hole wall flatness correlation model is constructed based on the hole wall texture distribution frequency parameters and the surface roughness annotation data, and the initial flatness coefficient of the hole wall is generated by model operation; In the embodiment of the present application, the design texture density data of the 50th drilling hole wall is obtained from the standard coordinate data set as 20 lines / mm (20 textures per millimeter length of the hole wall), and the surface roughness annotation data is Ra0.8 μm. The design texture density data is converted into the hole wall texture distribution frequency parameter, and the conversion formula is "frequency parameter=texture density x 2π x design radius", that is, 20 lines / mm x 2 x 3.14 x 4.22 mm≈530.3 lines / week (530.3 textures per circumferential hole wall). The hole wall flatness correlation model is constructed, the model input is the texture distribution frequency parameter and the surface roughness annotation data, and the output is the initial flatness coefficient of the hole wall, and the model formula is "initial flatness coefficient=(1-surface roughness / 10) x (1-1 / frequency parameter)", and the data is substituted to obtain (1-0.8 / 10) x (1-1 / 530.3)≈0.92 x 0.998≈0.918, and the initial flatness coefficient of the hole wall of the drilling hole is 0.918, and the initial flatness coefficients of the remaining drilling holes are calculated according to the same model.
[0026] Further, in combination with the design radius of each drilling hole, the theoretical curvature parameter of the drilling hole wall is calculated, the theoretical curvature parameter is input into the constructed hole wall flatness correlation model, the initial flatness coefficient of the hole wall is compensated and corrected, and the corrected flatness coefficient of the hole wall is generated; In the embodiment of the present application, the design radius of the 50th drilling hole is combined to calculate the theoretical curvature parameter of the hole wall, and the curvature parameter formula is "curvature=1 / design radius", that is, 1 / 4.22 mm≈0.237 mm -1 . The theoretical curvature parameter 0.237 mm -1 is input into the hole wall flatness correlation model, the model adds a curvature compensation term "compensation coefficient=0.05 x curvature parameter" (the greater the curvature, the greater the compensation coefficient), that is, 0.05 x 0.237≈0.01185. The initial flatness coefficient of the hole wall is compensated and corrected, and the correction formula is "corrected flatness coefficient=initial flatness coefficient+compensation coefficient", that is, 0.918+0.01185≈0.92985, and the corrected flatness coefficient of the hole wall of the drilling hole is 0.930 by retaining three decimal places, and the corrected flatness coefficients of the other drilling holes are calculated according to the respective theoretical curvature parameters and initial flatness coefficients.
[0027] Further, based on the corrected flatness coefficient of the hole wall, the allowable fluctuation threshold data of the hole wall design is extracted from the standard coordinate data set, the matching degree parameter of the corrected flatness coefficient of the hole wall and the allowable fluctuation threshold data is calculated, and the final design hole wall flatness parameter is determined according to the matching degree parameter.
[0028] In the embodiment of the present application, the corresponding hole wall design allowable fluctuation threshold data is extracted from the standard coordinate data set by correcting the flatness coefficient 0.930 based on the hole wall of the 50th drilling hole. When the corrected flatness coefficient is 0.9-0.95, the allowable fluctuation threshold is 0.05 mm. The matching degree parameter is calculated, and the matching degree formula is "matching degree = corrected flatness coefficient / (1-allowable fluctuation threshold)", that is, 0.930 / (1-0.05)=0.930 / 0.95≈0.978. When the matching degree is greater than or equal to 0.95, the allowable fluctuation threshold is directly used as the design hole wall flatness parameter. The matching degree of this drilling hole is 0.978, which is greater than 0.95, so the final design hole wall flatness parameter is 0.05 mm. If the matching degree of a drilling hole is less than 0.95 (for example, the corrected flatness coefficient is 0.88, the allowable fluctuation threshold is 0.06 mm, and the matching degree is 0.88 / 0.94≈0.936), then the design hole wall flatness parameter is corrected according to "design hole wall flatness parameter = allowable fluctuation threshold x matching degree", to ensure that the parameter matches the corrected flatness coefficient.
[0029] Further, step S24 includes the following steps: Step S241: By taking the extracted design circle center coordinate as the origin, the coordinate system parameters corresponding to the drilling hole design are retrieved from the standard coordinate data set, and the corresponding circular contour equation under the two-dimensional polar coordinate system is constructed in combination with the geometric properties of the design radius. The theoretical contour point cloud data of the design reference circle is generated by the circular contour equation, and the theoretical contour point cloud data is used as the basic data of the design reference circle contour; In the embodiment of the present application, the coordinate system parameters of the drilling hole design are retrieved from the standard coordinate data set by taking the design circle center coordinate (100, 200) of the 50th drilling hole as the origin (x axis along the length direction of the PCB, y axis along the width direction, unit: mm). In combination with the geometric properties of the drilling hole design radius 4.22 mm, the circular contour equation under the two-dimensional polar coordinate system is constructed: r=4.22 (r is the polar radius, and θ is the polar angle, ranging from 0 to 360°). The polar angle is taken at an interval of 1° (a total of 360 angle values), and each angle corresponding polar radius is calculated by substituting the equation, to generate theoretical contour point cloud data (such as θ=0° (4.22, 0°), θ=1° (4.22, 1°)… θ=359° (4.22, 359°)), a total of 360 point cloud data, each data containing polar radius and polar angle information, as the basic data of the design reference circle contour.
[0030] Step S242: Based on the generated theoretical contour point cloud data, the angle distribution parameter and the radial distance parameter corresponding to each point in the polar coordinate system are extracted, and the uniformity characteristics of the point cloud are analyzed through the angle distribution parameter. The point cloud distribution uniformity coefficient is calculated, and the point cloud distribution uniformity coefficient is corrected in combination with the radial distance parameter, to obtain the reference circle contour point cloud precision parameter; In the embodiment of the present application, the angle distribution parameters (polar angle interval 1°, uniform distribution) and radial distance parameters (all point polar radii are 4.22 mm) of each point are extracted from the theoretical contour point cloud data. The point cloud distribution uniformity coefficient is calculated, and the formula is "uniformity coefficient = 1-(maximum angle interval-minimum angle interval) / average angle interval". Since the angle interval is constant at 1°, the uniformity coefficient = 1-(1-1) / 1 = 1. Combined with the radial distance parameter correction, the correction formula is "precision parameter = uniformity coefficient x (1-radial distance standard deviation / design radius)", and the radial distance standard deviation is 0, so the precision parameter = 1 x (1-0 / 4.22) = 1. If there is a radial deviation in a certain drilling point cloud (such as polar radius 4.22 mm / 4.23 mm alternately), the standard deviation is 0.005 mm, and the corrected precision parameter = 1 x (1-0.005 / 4.22) ≈ 0.998. The reference circle contour point cloud precision parameter of the 50th drilling is 1.
[0031] Step S243: calling the obtained design hole wall flatness parameter, extracting the elastic modulus parameter of the PCB substrate and the heat affected zone parameter of the laser drilling from the standard coordinate data set, performing correlation operation on the design hole wall flatness parameter and the elastic modulus parameter, generating a hole wall deformation tolerance coefficient, and then combining the heat affected zone parameter to compensate the hole wall deformation tolerance coefficient to obtain the actual hole wall tolerance coefficient; In the embodiment of the present application, the design hole wall flatness parameter 0.05 mm of the 50th drilling is called, the elastic modulus parameter 200 GPa of the PCB substrate and the heat affected zone parameter 0.1 mm of the laser drilling are extracted from the standard coordinate data set. The design hole wall flatness parameter and the elastic modulus parameter are correlated and operated, and the formula is "deformation tolerance coefficient = design hole wall flatness parameter x elastic modulus / 1000", that is, 0.05 mm x 200 GPa / 1000 = 10 MPa·mm. Combined with the heat affected zone parameter compensation, the compensation formula is "actual tolerance coefficient = deformation tolerance coefficient x (1-heat affected zone parameter / design radius)", that is, 10 x (1-0.1 / 4.22) = 10 x 0.976 ≈ 9.76 MPa·mm, and the actual tolerance coefficient of the hole wall of the drilling is 9.76 MPa·mm.
[0032] Step S244: based on the reference circle contour point cloud precision parameter and the hole wall actual tolerance coefficient, a deviation threshold mapping model is constructed, the reference circle contour point cloud precision parameter is taken as the model input variable, the initial allowed deviation threshold is generated by model operation, and then the process complexity parameter of drilling processing is introduced to adjust the initial allowed deviation threshold to obtain the dynamic allowed deviation threshold of the design reference circle contour; In the embodiment of the present application, by constructing a deviation threshold mapping model based on the reference circle contour point cloud precision parameter 1 and the hole wall actual tolerance coefficient 9.76 MPa·mm, the model formula is "initial allowable deviation threshold = 0.01 × design radius × (precision parameter + actual tolerance coefficient / 10)". Substituting the data, 0.01 × 4.22 × (1 + 9.76 / 10) = 0.0422 × 1.976 ≈ 0.083 mm. From the standard coordinate data set, the drilling process complexity parameter (laser power fluctuation coefficient 0.8) is extracted, and the formula is adjusted as "dynamic allowable deviation threshold = initial allowable deviation threshold × process complexity parameter", that is, 0.083 × 0.8 ≈ 0.066 mm, and the dynamic allowable deviation threshold of the design reference circle contour is determined as 0.066 mm.
[0033] Step S245: integrating the theoretical contour point cloud data, the reference circle contour point cloud precision parameter and the dynamic allowable deviation threshold, generating a comprehensive parameter set containing contour geometric information, precision evaluation index and deviation control standard, which is the drilling design reference contour parameter.
[0034] In the embodiment of the present application, by integrating the theoretical contour point cloud data (360 polar coordinate points) of the 50th drilling, the reference circle contour point cloud precision parameter 1, and the dynamic allowable deviation threshold 0.066 mm, a comprehensive parameter set is generated. The set contains three parts of information: contour geometric information (design circle center (100, 200), design radius 4.22 mm, 360 theoretical contour points), precision evaluation index (point cloud precision parameter 1), and deviation control standard (dynamic allowable deviation threshold 0.066 mm). The set completely covers the key parameters of the drilling design reference contour, and can be directly used for the deviation comparison detection of the actual contour and the design contour of the subsequent PCB laser drilling, ensuring that the detection process has a clear reference basis.
[0035] Further, after the initial deviation vector of the drilling actual contour and the design contour is generated by comparing and calculating the edge contour feature data and the drilling design reference contour parameter in step S2, the following steps are further included: Performing time series analysis on the initial deviation vector to collect initial deviation vector data of multiple drillings on the same PCB, and constructing a deviation vector time series according to the drilling processing order; In the embodiment of the present application, the initial deviation vector data of the first to the fiftieth drill holes on the same PCB board (300mm*200mm, containing 1000 drill holes) is collected, the initial deviation vector of each drill hole contains 110 "angle-distance" elements (such as the first drill hole 0°-2.2 pixels, 3.27°-2.1 pixels,...). According to the laser drilling processing sequence (starting from the first drill hole at the upper left corner of the PCB board, sequentially processing to the twentieth along the horizontal direction, then moving vertically to process the twenty-first to the fortieth, and finally processing the forty-first to the fiftieth), the initial deviation vectors of the fifty drill holes are arranged in the processing order to construct a deviation vector time sequence, the sequence length is 50, and each sequence node corresponds to the complete initial deviation vector data of one drill hole, so as to ensure that the time sequence can reflect the change rule of the deviation in the processing process.
[0036] Further, the periodic characteristics of the deviation vector time sequence are analyzed by using the autocorrelation function to determine whether there is a periodic change of the deviation caused by the drift of the equipment running state; if there is a periodic change of the deviation, the period length and the deviation change amplitude parameter within the period are extracted, and an initial deviation trend prediction model is constructed based on the deviation change amplitude parameter; In the embodiment of the present application, the autocorrelation function of the deviation vector time sequence is calculated, and the autocorrelation function formula is "R(k)=Σ(x_i-μ)(x_{i+k}-μ) / Σ(x_i-μ) 2 " (k is the lag order, μ is the sequence mean, and x_i is the average distance value of the deviation vector of the i-th drill hole). The autocorrelation coefficients of k=1 to k=10 are calculated, the autocorrelation coefficient is 0.82 (close to 1) when k=5, and the autocorrelation coefficient is 0.79 when k=10, it is determined that there is a periodic change of the deviation with a period length of 5 (the deviation of every five drill holes shows similar changes). The deviation change amplitude parameter within the period is extracted: the average deviation distances of the first to the fifth drill holes are 2.1 pixels, 2.3 pixels, 2.5 pixels, 2.3 pixels, and 2.1 pixels, respectively, the maximum change amplitude is 0.4 pixels, and the minimum change amplitude is 0.2 pixels. An initial deviation trend prediction model is constructed based on the parameter, and the model formula is "predicted deviation=2.3+0.2*sin(2πk / 5)" (k is the drill hole serial number within the period), which is used to predict the deviation trend of the subsequent drill holes.
[0037] Further, each initial deviation vector in the deviation vector time sequence is decomposed into an x-axis deviation component time sequence and a y-axis deviation component time sequence based on the initial deviation trend prediction model; the x-axis deviation component time sequence and the y-axis deviation component time sequence are respectively subjected to multi-scale decomposition by using wavelet transform to extract low-frequency approximation coefficients and high-frequency detail coefficients at different scales; In the embodiment of the present application, each initial deviation vector in the deviation vector time series is decomposed into an x-axis deviation component time series and a y-axis deviation component time series based on the initial deviation trend prediction model. The decomposition rule is "x-axis deviation = distance x cos(angle), y-axis deviation = distance x sin(angle)", such as the x-axis deviation of the 0°-2.2 pixel of the first drilling hole = 2.2 x cos 0° = 2.2 pixels, y-axis deviation = 2.2 x sin 0° = 0 pixel; x-axis deviation of 3.27°-2.1 pixel = 2.1 x cos 3.27° ≈ 2.09 pixels, y-axis deviation = 2.1 x sin 3.27° ≈ 0.12 pixel. The x-axis (50 nodes, each node containing 110 x-axis deviation values) and y-axis deviation component time series are respectively subjected to 3-scale decomposition using db4 wavelet base, the first scale extracts high-frequency detail coefficients (reflecting short-term rapid fluctuations), the second scale extracts medium-frequency detail coefficients, and the third scale extracts low-frequency approximation coefficients (reflecting long-term slow changes), and each component time series is decomposed to obtain 3 groups of detail coefficients and 1 group of approximation coefficients.
[0038] Further, the low-frequency approximation coefficients are subjected to trend item extraction, the linear regression algorithm is used to fit the change trend of the low-frequency approximation coefficients to obtain the long-term trend parameters of the deviation component; the high-frequency detail coefficients are subjected to noise suppression processing, the threshold denoising algorithm is used to eliminate high-frequency noise and retain effective short-term fluctuation information. In the embodiment of the present application, the linear regression algorithm is used to fit the low-frequency approximation coefficients (3 scales, a total of 13 coefficient values: 2.1, 2.2, 2.3, 2.4, 2.3, 2.2, 2.3, 2.4, 2.5, 2.4, 2.3, 2.2, 2.3) of the x-axis deviation component time series, and the regression equation is "y = ax + b" (x is the drilling hole number, and y is the low-frequency approximation coefficient). The data calculation gives a = 0.008, b = 2.15, the fitting curve R² = 0.85, and the long-term trend parameter of the x-axis deviation component is "the low-frequency deviation increases by 0.008 pixels on average for every 1 drilling hole". Similarly, the long-term trend parameter of the y-axis low-frequency approximation coefficient is "the low-frequency deviation decreases by 0.002 pixels on average for every 1 drilling hole". The soft threshold denoising algorithm is used for the x-axis high-frequency detail coefficients (the first scale, 50 coefficient values), the threshold is set to 0.1 (determined based on 2 times of the coefficient standard deviation 0.05), the coefficients less than 0.1 in absolute value are set to 0, the coefficients greater than 0.1 are adjusted according to "coefficient = coefficient - threshold x sign(coefficient)" (such as 0.12 is adjusted to 0.02, and -0.13 is adjusted to -0.03), the high-frequency noise is eliminated, and the effective short-term fluctuation information (such as the 0.2 pixel sudden deviation when the 10th drilling hole is processed) is retained.
[0039] Further, the long-term trend parameters are wavelet reconstructed with the processed high-frequency detail coefficients to generate a predicted sequence of the deviation component; the predicted sequence of the x-axis deviation component and the predicted sequence of the y-axis deviation component are integrated into a deviation vector predicted sequence to construct a complete deviation trend prediction model; In the embodiment of the present application, the long-term trend parameters of the x-axis deviation component (0.008 pixels of low-frequency deviation increase per processed drilling hole) are wavelet reconstructed with the processed x-axis high-frequency detail coefficients (for example, 0.02 for the 10th drilling hole and -0.03 for the 20th drilling hole), inverse transformation of the db4 wavelet base is adopted, the low-frequency approximation coefficients and the 3-scale high-frequency detail coefficients are superimposed in the original decomposition order, missing data is supplemented through linear interpolation to generate the predicted sequence of the x-axis deviation component (50 nodes, 110 x-axis predicted deviation values for each node, for example, the x-axis deviation predicted value of the 51st drilling hole = 2.3 + 0.008*51 + 0.02 = 2.728 pixels). Similarly, the predicted sequence of the y-axis deviation component is generated (the y-axis deviation predicted value of the 51st drilling hole = 0.5 - 0.002*51 - 0.03 = 0.368 pixels). The two sequences are integrated according to the "angle-x-axis predicted deviation-y-axis predicted deviation" to generate the deviation vector predicted sequence and construct the complete deviation trend prediction model, which contains 50 historical deviation vectors and 1 future predicted vector.
[0040] Further, the accuracy of the complete deviation trend prediction model is evaluated by the cross-validation method, the historical deviation vector data is divided into a training set and a test set, the model is trained by using the training set, the prediction error of the model is calculated by using the test set, if the prediction error is less than a preset error threshold, the model is qualified, if the prediction error is greater than the preset error threshold, the wavelet decomposition scale and the regression algorithm parameters are adjusted, the model is retrained until it is qualified, and the deviation trend of the next drilling hole is predicted by using the model; In the embodiment of the present application, the model accuracy is evaluated by adopting 5-fold cross-validation method, 50 historical deviation vector data are divided into 5 groups (10 in each group), and 1 group is taken as the test set and 4 groups are taken as the training set in turn, and the training is performed for 5 times. The first training set is the first-40 drilling data, and the test set is the 41-50 drilling data. After training, the deviation value of the test set is predicted, and the Euclidean distance error of each predicted value and the actual value is calculated (for example, the actual x deviation of the 41st drilling is 2.4 pixels, and the predicted value is 2.35 pixels, and the error is 0.05 pixels). After 5 times of verification, the average error is 0.06 pixels, the preset error threshold is 0.1 pixels, the average error is less than the threshold, and the model is qualified. If the average error is 0.12 pixels (exceeding the threshold), the wavelet decomposition scale is adjusted to 4 scales, the linear regression algorithm parameter a is corrected from 0.008 to 0.007, and the training is performed for 5 times again until the average error is reduced to 0.08 pixels. The qualified model is used to predict the deviation trend of the 51st drilling: the x-axis deviation is 2.728 pixels, and the y-axis deviation is 0.368 pixels. The deviation shows a slow upward trend.
[0041] Further, the deviation trend prediction result is fed back to the initial deviation vector calculation link to correct the initial deviation vector calculation result of the subsequent drilling in advance, reduce the deviation misjudgment caused by equipment drift, and generate a corrected deviation vector.
[0042] In the embodiment of the present application, the deviation trend prediction result (x-axis 2.728 pixels, y-axis 0.368 pixels) of the 51st drilling is fed back to the initial deviation vector calculation link. When calculating the actual initial deviation vector of the 51st drilling, the actual edge contour registration deviation value (for example, the x-axis actual deviation is 2.75 pixels, and the y-axis actual deviation is 0.38 pixels) is obtained first, and then the correction is performed according to “corrected deviation = actual deviation - predicted deviation”, the x-axis corrected deviation = 2.75-2.728 = 0.022 pixels, and the y-axis corrected deviation = 0.38-0.368 = 0.012 pixels. If not corrected, the actual deviation may be misjudged as exceeding the error (the design allows the deviation of 0.5 pixels) due to the equipment drift (for example, the laser head is slightly offset), and the corrected deviation is much smaller than the threshold, so that the misjudgment is avoided. For the subsequent 52-100 drillings, the initial deviation vector calculation result is corrected in advance by using the model prediction result, the corrected deviation vector is generated, and it is ensured that the deviation judgment of each drilling is not disturbed by the equipment drift.
[0043] Further, the step of feeding back the deviation trend prediction result to the initial deviation vector calculation link comprises the following steps: obtaining the x-axis deviation prediction value and the y-axis deviation prediction value of the next drilling from the deviation trend prediction model, and integrating them into a predicted deviation vector; In the embodiment of the present application, the predicted data of the next to be detected drilling hole (the 51st drilling hole of the PCB) is obtained from the deviation trend prediction model, the model output x-axis deviation prediction value is 2.728 pixels, and the y-axis deviation prediction value is 0.368 pixels. The x-axis prediction value and the y-axis prediction value are integrated into a predicted deviation vector in the format of "x-axis prediction value-y-axis prediction value", and the vector is specifically expressed as (2.728, 0.368). The vector contains the expected deviation information of the next drilling hole in the horizontal and vertical directions, and provides a clear reference basis for subsequent deviation correction.
[0044] Further, in the calculation of the initial deviation vector of the next drilling hole, the predicted deviation vector is used as a correction factor to fuse and calculate the initial deviation raw value obtained by comparing the edge profile, so as to determine the weight of the predicted deviation vector according to the historical prediction accuracy of the deviation trend prediction model, and to obtain the corrected initial deviation vector through fusion calculation. In the embodiment of the present application, the initial deviation raw value of the 51st drilling hole is obtained by comparing the edge profile, the x-axis raw deviation is 2.75 pixels, and the y-axis raw deviation is 0.38 pixels. According to the historical prediction accuracy of the deviation trend prediction model, the weight is determined, the average error of the past 50 predictions of the model is 0.06 pixels, the weight of the predicted deviation vector is set to 0.8, and the weight of the initial deviation raw value is set to 0.2. The fusion calculation is carried out by weighted summation, the corrected x-axis deviation is 2.728*0.8+2.75*0.2=2.7324 pixels, the corrected y-axis deviation is 0.368*0.8+0.38*0.2=0.3704 pixels, and the corrected initial deviation vector (2.7324, 0.3704) is integrated and generated.
[0045] Further, the corrected initial deviation vector after each correction and the actual detected deviation value are recorded, the correction deviation is calculated, and the correction deviation data in a preset time period is counted, the mean, variance and maximum deviation value of the correction deviation are calculated, and a correction deviation statistical data set is constructed. In the embodiment of the present application, after each detection is completed, the corrected initial deviation vector (such as the 51st drilling hole (2.7324, 0.3704)) and the actual detected deviation value (the x-axis is 2.73 pixels and the y-axis is 0.37 pixels, which are measured by a high-precision coordinate measuring instrument) are recorded, the correction deviation is calculated: the x-axis correction deviation is 2.7324-2.73=0.0024 pixels, and the y-axis correction deviation is 0.3704-0.37=0.0004 pixels. The preset time period is 1 hour (20 drilling holes are detected during the period), the correction deviation data of 20 drilling holes is counted, and the correction deviation mean x-axis is 0.0021 pixels, the y-axis is 0.0003 pixels, the variance x-axis is 1.2*10 -6 , the y-axis is 8*10 -8The maximum deviation value is 0.003 pixels on the x-axis and 0.001 pixels on the y-axis, and the correction deviation statistical data set is constructed according to "drilling hole number-x-axis correction deviation-y-axis correction deviation".
[0046] Further, the correlation between the correction deviation statistical data set and the deviation trend prediction model parameters is analyzed to determine the key model parameters affecting the prediction accuracy, including the wavelet decomposition layer number, the regression coefficient initial value, and the threshold value of threshold denoising; the gradient descent algorithm is used to iteratively optimize the key model parameters, with the minimum variance of the correction deviation as the objective function, and the adjustment amount of each key parameter in each iteration is calculated; In the embodiment of the present application, by analyzing the correlation between the correction deviation statistical data set and the model parameters, it is found that when the wavelet decomposition layer number is 3, the correction deviation variance is minimum, and when the layer number increases to 4, the variance increases by 15%; when the regression coefficient initial value a=0.008, the deviation mean is minimum, and when it is adjusted to 0.007, the mean increases by 8%; when the threshold value of threshold denoising is 0.1, the maximum deviation is minimum, and when the threshold value is 0.08, the maximum deviation increases by 20%, so the three items are determined as the key model parameters. The gradient descent algorithm is used, with the minimum variance of the correction deviation as the objective function, and the learning rate is set to 0.001. The calculation result is that the wavelet decomposition layer number adjustment amount is -0.1 (which needs to be an integer, and finally determined as 3), the regression coefficient a adjustment amount is -0.0002 (updated to 0.0078), and the threshold adjustment amount is 0.005 (updated to 0.105).
[0047] Further, the model parameters are updated according to the adjustment amount to generate an optimized deviation trend prediction model; the optimized deviation trend prediction model is verified in real time, the latest collected drilling deviation data are used as verification samples, the prediction error of the model is calculated, if the prediction error meets the accuracy requirement, the optimization is completed, if not, the iterative optimization is continued until the model prediction accuracy is stable within the preset range.
[0048] In the embodiment of the present application, the model parameters are updated according to the adjustment amount, the wavelet decomposition layer number is kept at 3, the regression coefficient a=0.0078, and the threshold value=0.105, and the optimized deviation trend prediction model is generated. The latest collected 5 drilling deviation data are selected as verification samples, input into the model for prediction, the 56th drilling hole is predicted to have an x-axis deviation of 2.78 pixels and a y-axis deviation of 0.39 pixels, the actual detection value is x-axis 2.778 pixels and y-axis 0.389 pixels, the prediction error is x-axis 0.002 pixels and y-axis 0.001 pixels, which meets the preset accuracy requirement (error <0.01 pixels), and the optimization is completed. If the prediction error exceeds the threshold value, the adjustment amount is recalculated (such as reducing the learning rate to 0.0005), and the iterative optimization is continued until the prediction error of the last 10 verification samples is stable within the preset range.
[0049] Further, step S3 comprises the following steps: Step S31: screening the continuous power time series data collected by the laser power sensor from the equipment running reference data set, and segmenting the continuous power time series data by a sliding window, calculating the power change amplitude and change period of each segment of data, and generating laser power original fluctuation parameters; and then combining the thermal conductivity parameter of the PCB substrate, compensating the thermal effect of the laser power original fluctuation parameters to obtain the laser power fluctuation parameters. In the embodiment of the application, the continuous power time series data collected by the laser power sensor is screened from the equipment running reference data set, the data acquisition frequency is 10 Hz, the time length is 10 minutes, and there are 6000 data points (power range 14-16 W). The sliding window method is used for segmentation, the window size is set to 100 data points (corresponding to 10 seconds), the step size is 50 data points, and 119 segments of data are generated. The power change amplitude (maximum value-minimum value) and change period (adjacent peak value interval time) of each segment of data are calculated, such as the first segment with an amplitude of 1.8 W and a period of 0.5 s, and the second segment with an amplitude of 2.0 W and a period of 0.5 s, to generate laser power original fluctuation parameters (average amplitude 1.9 W, average period 0.5 s). Combined with the thermal conductivity of the PCB FR-4 substrate of 0.25 W / (m·K), the thermal effect compensation model is substituted into the correction formula "compensated amplitude=original amplitude×(1-thermal conductivity×0.01)" and "compensated period=original period×(1+thermal conductivity×0.01)", and the compensated amplitude is calculated as 1.9×(1-0.25×0.01)=1.8955 W, and the period is 0.5×(1+0.25×0.01)=0.50125 s, to obtain the laser power fluctuation parameters.
[0050] Step S32: extracting the rotation speed feedback data and displacement encoding data of the drilling feed motor in the equipment running reference data set, converting the rotation speed feedback data into instantaneous feed speed values, calculating the feed speed change rate by the difference between adjacent instantaneous speed values, and generating feed speed original change parameters; introducing the backlash compensation parameter of the transmission system to modify the feed speed original change parameters to obtain the drilling feed speed change parameters. In the embodiment of the present application, the rotational speed feedback data (acquisition frequency 5 Hz, a total of 3000 data points, rotational speed range 100-120 r / min) and displacement encoding data (0.1 mm displacement per revolution) of the drilling feed motor in the equipment operation reference data set are extracted. The rotational speed feedback data is converted into instantaneous feed speed values, and the formula is "speed=rotational speed x 0.1 mm / r". For example, when the rotational speed is 100 r / min, the speed is 10 mm / min, and when the rotational speed is 120 r / min, the speed is 12 mm / min. The difference between adjacent instantaneous speed values is calculated to obtain the feed speed change rate. For example, the first group of difference values is 0.2 mm / min, and the second group of difference values is 0.3 mm / min. The original change parameter of the feed speed (average change rate 0.25 mm / min) is generated. The transmission system backlash compensation parameter 0.05 mm / min (obtained through the equipment manual) is introduced, and the correction formula is "corrected change rate=original change rate-backlash compensation parameter". The corrected change rate is calculated as 0.25-0.05=0.2 mm / min, and the drilling feed speed change parameter (containing 119 pieces of corrected change rate data) is obtained.
[0051] Step S33: The displacement sensor data of the laser focusing system and the focal length parameter of the optical lens in the equipment operation reference data set are called. The actual focusing position coordinates of the light spot are calculated according to the displacement sensor data, and the focusing position coordinates are compared with the designed focusing position coordinates to generate the original offset parameter of the focusing position. The original offset parameter of the focusing position is compensated for the environment in combination with the influence parameter of the environmental temperature on the optical refractive index to obtain the laser light spot focusing position parameter. In the embodiment of the present application, the displacement sensor data of the laser focusing system in the device operation reference data set is called (acquisition frequency 20 Hz, time length 5 minutes, a total of 6000 data points, displacement range-0.1-0.1 mm) and the optical lens focal length parameter 100 mm. The actual focusing position coordinates of the light spot are calculated according to the displacement sensor data, and the formula is "actual coordinates=focal length+displacement sensor data", such as displacement 0.02 mm, actual coordinates 100.02 mm, displacement-0.03 mm, 99.97 mm. The design focusing position coordinates are 100.00 mm, the difference between the actual coordinates and the design coordinates of each point is calculated, and the original offset parameters of the focusing position are generated: such as the first point offset 0.02 mm, the second point offset-0.03 mm, the third point offset 0.01 mm, a total of 6000 offset values, the maximum positive offset is 0.08 mm, the maximum negative offset is-0.07 mm, and the average offset is 0.005 mm, which fully reflects the offset of the focusing position of the light spot. Secondly, the current environmental temperature data 25℃ is collected by the environmental sensor, and the temperature influence parameter of the optical refractive index is called from the environmental parameter database: the optical refractive index changes 0.000015 (20-30℃ interval) when the temperature changes 1℃. The offset value of a certain point in the original offset parameters of the focusing position is 0.02 mm, and the environmental compensation amount is calculated, and the formula is "compensation amount=original offset value×(1+(environmental temperature-20℃)×0.000015)", and the compensation amount is 0.02×(1+5×0.000015)=0.02×1.000075=0.0200015 mm; another point original offset-0.03 mm, compensation amount=-0.03×(1+5×0.000015)=-0.03000225 mm. The compensation of all 6000 original offset values is generated, and the laser light spot focusing position parameters are generated, wherein the maximum positive offset is 0.080006 mm, the maximum negative offset is-0.070005 mm, and the average offset is 0.005000375 mm, which eliminates the interference of the environmental temperature on the focusing position.
[0052] Step S34: taking the laser power fluctuation parameter, the drilling feed speed change parameter, and the laser light spot focusing position parameter as the matrix row vector, taking the x-axis deviation component and the y-axis deviation component of the corrected deviation vector as the matrix column vector, calculating the correlation strength of each parameter and the deviation component by the Pearson correlation coefficient, and constructing the drilling deviation influence factor matrix by taking the correlation strength as the element; In the embodiment of the application, by determining the matrix row vector as the laser power fluctuation parameter (compensated amplitude 1.8955 W, period 0.50125 s), the drilling feed speed change parameter (corrected change rate 0.2 mm / min), and the laser spot focusing position parameter (average offset 0.005000375 mm), there are three row vectors; the column vector is the x-axis deviation component (0.022 pixels) and the y-axis deviation component (0.012 pixels) of the corrected deviation vector, and there are two column vectors. The Pearson correlation coefficient is calculated: the power fluctuation and the x-axis deviation correlation coefficient is 0.72 (strong positive correlation), and the y-axis deviation correlation coefficient is 0.65 (strong positive correlation); the feed speed change and the x-axis deviation correlation coefficient is 0.48 (moderate positive correlation), and the y-axis deviation correlation coefficient is 0.51 (moderate positive correlation); the focusing position offset and the x-axis deviation correlation coefficient is 0.81 (extremely strong positive correlation), and the y-axis deviation correlation coefficient is 0.78 (strong positive correlation). The drilling deviation influence factor matrix of 3x2 is constructed with these correlation coefficients as elements: [[0.72, 0.65], [0.48, 0.51], [0.81, 0.78]], and the larger the matrix element value, the stronger the influence of the parameter on the deviation component.
[0053] Step S35: performing eigenvalue decomposition on the drilling deviation influence factor matrix, extracting the main eigenvalue and the corresponding eigenvector of the matrix, calculating the initial weight coefficient according to the proportion of each component of the eigenvector, and then iteratively optimizing the initial weight coefficient in combination with the actual contribution of each influence factor in the historical drilling deviation detection data to generate the weight coefficient of each influence factor on the drilling deviation.
[0054] In the embodiment of the application, by performing eigenvalue decomposition on the drilling deviation influence factor matrix of 3x2, the main eigenvalue λ1=1.42 (proportion 85%) is obtained by matrix operation, and the corresponding eigenvector v1=[0.32, 0.25, 0.43] (the three components correspond to power fluctuation, feed speed, and focusing position respectively). The initial weight coefficient is calculated according to the proportion of the eigenvector components: power fluctuation weight=0.32 / (0.32+0.25+0.43)=0.32, feed speed weight=0.25 / 1=0.25, and focusing position weight=0.43 / 1=0.43. The historical 1000 sets of drilling deviation detection data are retrieved, and the actual contribution of each influence factor is counted: the focusing position offset actually causes the deviation proportion of 45%, the power fluctuation of 30%, and the feed speed of 25%. With the actual contribution as the target, the initial weight is iteratively optimized by using the gradient descent method, the focusing position weight is adjusted to 0.44, the power fluctuation is adjusted to 0.31, and the feed speed is adjusted to 0.25 in the first iteration, and the weight coefficient is stable after the fifth iteration: power fluctuation 0.30, feed speed 0.25, and focusing position 0.45. The weight coefficient can accurately reflect the actual influence degree of each influence factor on the drilling deviation, and can be used for subsequent deviation reason analysis and equipment parameter adjustment.
[0055] Further, the step of combining the thermal conductivity parameter of the PCB substrate in step S31 to compensate the thermal effect of the laser power original fluctuation parameter includes the following steps: The substrate type data of the to-be-detected PCB is called from the PCB substrate attribute database, the corresponding substrate thermophysical property file is matched based on the substrate type data, and the thermal conductivity parameter and the specific heat capacity parameter of the substrate are extracted therefrom, and the thermal conductivity parameter is taken as the core basic parameter for thermal effect compensation. In the embodiment of the present application, the substrate type data of the to-be-detected PCB is called from the PCB substrate attribute database, and it is determined that the PCB substrate is an FR-4 epoxy resin glass cloth substrate. Based on the substrate type, the corresponding substrate thermophysical property file is matched, and the thermal conductivity parameter of the FR-4 substrate recorded in the file is 0.25 W / (m·K), and the specific heat capacity parameter is 1.2 kJ / (kg·K). The thermal conductivity parameter 0.25 W / (m·K) is taken as the core basic parameter for thermal effect compensation, which directly reflects the heat conduction capacity of the substrate and is the key basis for subsequent calculation of the thermal influence area and correction of the laser power.
[0056] Further, based on the extracted specific heat capacity parameter, the power peak value data in the laser power original fluctuation parameter is combined, the instantaneous heat input rate parameter when the laser acts on the substrate is calculated through the heat conduction equation, and then the initial range parameter of the substrate thermal influence area is generated according to the instantaneous heat input rate parameter and the substrate thickness data. In the embodiment of the present application, based on the extracted FR-4 substrate specific heat capacity parameter 1.2 kJ / (kg·K), the power peak value data 15 W (collected by the laser power monitoring module) in the laser power original fluctuation parameter is combined. The instantaneous heat input rate is calculated through the heat conduction equation Q=mcΔT (Q is heat, m is mass, c is specific heat capacity, and ΔT is temperature change). The laser action time is set to 0.1 ms, the action area mass is set to 0.001 kg, and the instantaneous heat input rate=(power peak value×action time) / (specific heat capacity×action area mass×action time)=15 W / (1.2×10 3 kJ / (kg·K)×0.001 kg)=15 / 1.2=12.5 K / s. Combined with the substrate thickness data 1.6 mm, the initial range parameter of the thermal influence area is calculated by the formula "thermal influence area radius=instantaneous heat input rate×substrate thickness×0.01", and the initial range parameter of the thermal influence area is 12.5×1.6×0.01=0.2 mm, that is, the thermal influence area radius is 0.2 mm.
[0057] Further, based on the initial range parameter, the correlation between the original laser power fluctuation and the change of the thermal influence area is analyzed, and a power fluctuation-thermal influence correlation coefficient is obtained by linear regression algorithm fitting, and the power fluctuation-thermal influence correlation coefficient is taken as a correlation calibration parameter for thermal effect compensation. In the embodiment of the application, based on the initial range parameter 0.2 mm of the thermal influence area, the original laser power fluctuation data (power fluctuation range 14-16 W, fluctuation interval 0.5 s) is collected, and the corresponding thermal influence area change (area radius 0.18 mm when fluctuation is 14 W, and 0.22 mm when fluctuation is 16 W) is measured synchronously. The relationship between the power fluctuation and the thermal influence area is fitted by linear regression algorithm, and the power fluctuation value is x (W) and the thermal influence area radius is y (mm). The regression equation y=0.02x-0.2 is obtained by substituting the data, and the power fluctuation-thermal influence correlation coefficient is 0.02 mm / W (regression coefficient), which is taken as a correlation calibration parameter for thermal effect compensation, and is used to quantify the influence degree of the power fluctuation on the thermal influence area.
[0058] Further, the thermal conductivity coefficient parameter and the power fluctuation-thermal influence correlation coefficient are substituted into the thermal effect compensation model to dynamically correct the power fluctuation amplitude and the fluctuation period in the original laser power fluctuation parameter, and generate the preliminary compensated laser power parameter. In the embodiment of the application, the thermal conductivity coefficient parameter 0.25 W / (m·K) and the power fluctuation-thermal influence correlation coefficient 0.02 mm / W are substituted into the thermal effect compensation model, and the model formula is "corrected power fluctuation amplitude=original fluctuation amplitude×(1-thermal conductivity coefficient×correlation coefficient)" and "corrected fluctuation period=original period×(1+thermal conductivity coefficient×correlation coefficient)". The original laser power fluctuation amplitude is 2 W, and the fluctuation period is 0.5 s. Substituting the calculation results, the corrected fluctuation amplitude is 2×(1-0.25×0.02)=2×0.995=1.99 W, and the corrected fluctuation period is 0.5×(1+0.25×0.02)=0.5×1.005=0.5025 s, and the preliminary compensated laser power parameter (fluctuation amplitude 1.99 W, period 0.5025 s) is generated.
[0059] Further, the pulse frequency parameter and the pulse width parameter of the laser drilling are introduced to perform secondary calibration on the preliminary compensated laser power parameter, calculate the calibrated power fluctuation stability coefficient, and if the coefficient meets the preset thermal effect control requirement, the calibrated parameter is determined as the laser power fluctuation parameter; if not, the weight distribution of the thermal effect compensation model is adjusted again, and the compensation calculation is performed again until the requirement is met.
[0060] In the embodiment of the present application, the laser power parameter after the preliminary compensation is calibrated again by introducing the pulse frequency parameter 50 kHz (50000 pulses per second) and the pulse width parameter 20 ns (duration of each pulse) of the laser drilling, and the calibration formula is "power fluctuation stability coefficient = (corrected fluctuation amplitude / pulse frequency) x (pulse width / 10 -9 )". Substituting the data, the stability coefficient = (1.99 / 50000) x (20 / 10 -9 ) = 3.98 x 10 -5 x 2 x 10 10 = 796. The preset thermal effect control requirement is stability coefficient >= 750, and 796 meets the requirement, so the calibrated parameter (fluctuation amplitude 1.99 W, period 0.5025 s, frequency 50 kHz, width 20 ns) is determined as the laser power fluctuation parameter. If the stability coefficient is 740 (not meeting the requirement), the thermal effect compensation model is adjusted, the thermal conductivity coefficient weight is increased from 1 to 1.02, the corrected parameter is recalculated, and the stability coefficient is up to the standard.
[0061] Further, the present application also provides a PCB laser drilling offset detection system, which comprises a processor, a memory, and a computer program stored in the memory and capable of running on the processor, and is used for executing the PCB laser drilling offset detection method as described above.
[0062] The above only describes the embodiments of the present application and is not used to limit the present application. The present application can have various changes and variations for those skilled in the art. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application shall be included in the scope of the claims of the present application.
Claims
1. A method for detecting laser drilling misalignment on a PCB board, characterized in that, Includes the following steps: Step S1: Obtain the original image data corresponding to the laser drilling area of the PCB board, the standard hole position coordinate data in the drilling design file, and the real-time operating parameter data corresponding to the laser drilling equipment. Perform noise suppression and illumination equalization processing on the original image data to generate preprocessed image data, perform format standardization processing on the standard hole position coordinate data to generate a standard coordinate dataset, and perform outlier removal processing on the real-time operating parameter data to generate a device operating benchmark dataset. Step S2: Extract edge contour feature data of the borehole area based on preprocessed image data, determine the borehole design reference contour parameters by combining standard coordinate dataset, and calculate the initial deviation vector between the actual borehole contour and the design contour by comparing the edge contour feature data with the borehole design reference contour parameters. Step S3: Extract laser power fluctuation parameters, drilling feed speed variation parameters, and laser spot focusing position parameters based on the equipment operation benchmark dataset. Combine the initial deviation vector to construct a drilling deviation influence factor matrix, and generate the weight coefficients of each influence factor on the drilling deviation through the drilling deviation influence factor matrix calculation. Step S4: Correct the initial deviation vector based on the weighting coefficient to generate an accurate deviation vector, and calculate the offset distance and offset direction parameters between the actual center of the drill hole and the design center based on the accurate deviation vector. Combine the PCB board drilling accuracy requirements to determine whether there is a deviation in the drill hole and generate the drilling deviation detection result.
2. The PCB board laser drilling misalignment detection method according to claim 1, characterized in that, The generation of preprocessed image data in step S1 includes the following steps: Step S101: Simultaneously acquire original images of the laser drilling area of the PCB board from the front, side and oblique angles using a multi-view industrial camera array, and perform distortion correction on the original images acquired from each view. Then, use image registration technology to fuse and stitch the multi-view corrected images to generate original image data covering the entire drilling area of the PCB board. Step S102: When performing noise suppression processing on the original image data, an adaptive median filtering algorithm is used to identify salt-and-pepper noise and Gaussian noise regions in the original image. The filter kernel size and smoothing coefficient are set for different noise types, and pixel reconstruction is performed on the corresponding noise regions to generate a preliminary denoised image. Step S103: When performing illumination equalization processing on the preliminary denoised image, the illumination distribution characteristics of the image are analyzed by gray-level histogram to determine the areas with excessive illumination and insufficient illumination. The Retinex algorithm is then used to adjust the pixel gray values in different illumination areas to make the overall gray-level distribution of the image more uniform, so as to generate preprocessed image data.
3. The PCB board laser drilling misalignment detection method according to claim 1, characterized in that, Step S2 includes the following steps: Step S21: Construct a multi-scale Gaussian pyramid to decompose the preprocessed image data in scale space. At different scale levels, use the Canny edge detection operator to calculate the gradient magnitude and gradient direction of the image, and use non-maximum suppression to filter out candidate edge points at each scale. Step S22: Perform cross-scale fusion on candidate edge points at different scales to connect discrete candidate edge points into continuous edge contours, and eliminate small breaks and burrs in the edge contours through morphological closing operations to generate edge contour feature data of the drilling area. Step S23: When determining the borehole design reference profile parameters by combining the standard coordinate dataset, extract the design center coordinates, design radius, and design borehole wall flatness parameters for each borehole from the standard coordinate dataset; Step S24: Construct the design reference circle profile of the borehole based on the design center coordinates and design radius, and convert the design hole wall flatness parameters into the allowable deviation threshold of the design reference circle profile to form the borehole design reference profile parameters; Step S25: When calculating the initial deviation vector between the actual borehole profile and the design profile by comparing the edge profile feature data with the borehole design reference profile parameters, the actual borehole edge profile feature data and the design reference circular profile are registered using the iterative nearest point algorithm. The Euclidean distance between each registration point pair is calculated, and the Euclidean distance of all registration point pairs and the angle information of the corresponding points are integrated into the initial deviation vector.
4. The PCB board laser drilling misalignment detection method according to claim 3, characterized in that, Step S23 includes the following steps: The original vector map data corresponding to the borehole design is retrieved from the standard coordinate dataset. Based on the hole position annotation layer in the original vector map data, the design boundary vector information of each borehole is identified. At the same time, the initial contour path corresponding to the borehole design is generated by fitting the inflection point coordinates corresponding to the design boundary vector information. Then, according to the center point calculation rules of the initial contour path, the design center coordinates of each borehole are extracted. By taking the design center coordinates of each borehole as a reference, the contour radius annotation data corresponding to the borehole design is extracted from the standard coordinate dataset. Combined with the distance deviation values from each point on the contour path to the design center coordinates, the radius deviation distribution parameters are calculated and generated. Based on the radius deviation distribution parameters, the contour radius annotation data is corrected to obtain the design radius of each borehole. The design texture density data and surface roughness annotation data of the borehole wall are obtained from the standard coordinate dataset. The design texture density data is converted into borehole wall texture distribution frequency parameters. Based on the borehole wall texture distribution frequency parameters and surface roughness annotation data, a borehole wall smoothness correlation model is constructed. The initial smoothness coefficient of the borehole wall is generated through model calculation. Based on the design radius of each borehole, the theoretical curvature parameters of the borehole wall are calculated. The theoretical curvature parameters are then input into the constructed borehole wall flatness correlation model. The initial flatness coefficient of the borehole wall is corrected by curvature compensation to generate the corrected flatness coefficient of the borehole wall. Based on the hole wall correction flatness coefficient, the allowable undulation threshold data of the hole wall design is extracted from the standard coordinate dataset. The matching degree parameter between the hole wall correction flatness coefficient and the allowable undulation threshold data is calculated. The final design hole wall flatness parameter is determined based on the matching degree parameter.
5. The PCB board laser drilling misalignment detection method according to claim 3, characterized in that, Step S24 includes the following steps: Step S241: Using the extracted design circle center coordinates as the origin, retrieve the coordinate system parameters corresponding to the borehole design from the standard coordinate dataset, and construct the corresponding circle contour equation in the two-dimensional polar coordinate system in combination with the geometric properties of the design radius. Calculate and generate the theoretical contour point cloud data of the design reference circle using the circle contour equation, and use this theoretical contour point cloud data as the basic data of the design reference circle contour. Step S242: Based on the generated theoretical contour point cloud data, extract the angular distribution parameters and radial distance parameters of each point in the polar coordinate system, analyze the uniformity characteristics of the point cloud through the angular distribution parameters, calculate the point cloud distribution uniformity coefficient, and then correct the point cloud distribution uniformity coefficient by combining the radial distance parameters to obtain the accuracy parameters of the reference circle contour point cloud. Step S243: Call the obtained design hole wall flatness parameters, extract the elastic modulus parameters of the PCB substrate and the heat-affected zone parameters of the laser drilling from the standard coordinate dataset, perform correlation calculation between the design hole wall flatness parameters and the elastic modulus parameters to generate the hole wall deformation tolerance coefficient, and then compensate the hole wall deformation tolerance coefficient by combining the heat-affected zone parameters to obtain the actual tolerance coefficient of the hole wall. Step S244: Based on the accuracy parameters of the reference circular contour point cloud and the actual tolerance coefficient of the hole wall, construct a deviation threshold mapping model. Use the accuracy parameters of the reference circular contour point cloud as the model input variable, generate an initial allowable deviation threshold through model calculation, and then introduce the process complexity parameter of drilling to adjust the initial allowable deviation threshold to obtain the dynamic allowable deviation threshold of the designed reference circular contour. Step S245: Integrate theoretical contour point cloud data, reference circle contour point cloud accuracy parameters and dynamic allowable deviation threshold to generate a comprehensive parameter set containing contour geometric information, accuracy evaluation indicators and deviation control standards. This set is the reference contour parameter for borehole design.
6. The PCB board laser drilling misalignment detection method according to claim 1, characterized in that, After calculating the initial deviation vector between the actual borehole profile and the designed profile by comparing the edge profile feature data with the borehole design reference profile parameters in step S2, the following steps are also included: Time series analysis is performed on the initial deviation vector to collect initial deviation vector data of multiple holes on the same PCB board, and a time series of deviation vectors is constructed according to the drilling sequence. The periodicity of the deviation vector time series is analyzed by autocorrelation function to determine whether there is a periodic change in deviation caused by the drift of equipment operating status. If there is a periodic change in deviation, the period length and the deviation change amplitude parameters within the period are extracted, and an initial deviation trend prediction model is constructed based on the deviation change amplitude parameters. Based on the initial deviation trend prediction model, each initial deviation vector in the deviation vector time series is decomposed into x-axis deviation component time series and y-axis deviation component time series; wavelet transform is used to decompose the x-axis deviation component time series and y-axis deviation component time series into multi-scale decomposition, and low-frequency approximation coefficients and high-frequency detail coefficients at different scales are extracted. Trend terms are extracted from low-frequency approximation coefficients, and the changing trend of low-frequency approximation coefficients is fitted by a linear regression algorithm to obtain the long-term trend parameters of the deviation components; noise suppression is performed on high-frequency detail coefficients, and a threshold denoising algorithm is used to remove high-frequency noise while retaining effective short-term fluctuation information. Wavelet reconstruction is performed on the long-term trend parameters and the processed high-frequency detail coefficients to generate a prediction sequence for the deviation components; the x-axis deviation component prediction sequence and the y-axis deviation component prediction sequence are integrated into a deviation vector prediction sequence to construct a complete deviation trend prediction model. The accuracy of the complete deviation trend prediction model is evaluated by cross-validation. The historical deviation vector data is divided into training set and test set. The model is trained using the training set and the prediction error of the model is calculated using the test set. If the prediction error is less than the preset error threshold, the model is qualified. If it is greater than the preset error threshold, the wavelet decomposition scale and regression algorithm parameters are adjusted and the model is retrained until it is qualified. At the same time, the deviation change trend of the next borehole is predicted by the model. The deviation trend prediction results are fed back to the initial deviation vector calculation stage to correct the initial deviation vector calculation results of subsequent drilling in advance, reduce the misjudgment of deviation caused by equipment drift, and thus generate a corrected deviation vector.
7. The PCB board laser drilling misalignment detection method according to claim 6, characterized in that, The step of feeding back the deviation trend prediction result to the initial deviation vector includes the following steps: The predicted x-axis and y-axis deviation values for the next borehole are obtained from the deviation trend prediction model and integrated into a prediction deviation vector. When calculating the initial deviation vector of the next borehole, the predicted deviation vector is used as a correction factor and fused with the original value of the initial deviation obtained by edge profile comparison. The weight of the predicted deviation vector is determined according to the historical prediction accuracy of the deviation trend prediction model, and the corrected initial deviation vector is obtained through fusion calculation. Record the initial deviation vector after each correction and the actual deviation value obtained by detection, calculate the correction deviation, and statistically analyze the correction deviation data within a preset time period. Calculate the mean, variance, and maximum deviation value of the correction deviation to construct a correction deviation statistical data set. The correlation between the statistical data set of correction deviation and the parameters of the deviation trend prediction model was analyzed to determine the key model parameters that affect the prediction accuracy, including the number of wavelet decomposition levels, the initial values of regression coefficients, and the threshold value for threshold denoising. The gradient descent algorithm was used to iteratively optimize the key model parameters, with the minimization of the variance of the correction deviation as the objective function, and the adjustment amount of each key parameter in each iteration was calculated. The model parameters are updated based on the adjustment amount to generate an optimized deviation trend prediction model. The optimized deviation trend prediction model is then validated in real time using the latest collected borehole deviation data as validation samples. The prediction error of the model is calculated. If the prediction error meets the accuracy requirements, the optimization is completed. If not, iterative optimization continues until the model prediction accuracy stabilizes within the preset range.
8. The PCB board laser drilling misalignment detection method according to claim 6, characterized in that, Step S3 includes the following steps: Step S31: Select continuous power time series data collected by laser power sensor from the equipment operation benchmark dataset, and process the continuous power time series data into segments through a sliding window. Calculate the power change amplitude and change period of each segment to generate the original laser power fluctuation parameters. Then, combine the thermal conductivity parameters of the PCB substrate to perform thermal effect compensation on the original laser power fluctuation parameters to obtain the laser power fluctuation parameters. Step S32: Extract the speed feedback data and displacement encoding data of the drilling feed motor from the equipment operating benchmark data set, convert the speed feedback data into instantaneous feed speed values, calculate the feed speed change rate by the difference between adjacent instantaneous speed values, and generate the original feed speed change parameters; introduce the backlash compensation parameters of the transmission system to correct the original feed speed change parameters, and obtain the drilling feed speed change parameters. Step S33: Retrieve the displacement sensor data of the laser focusing system and the focal length parameters of the optical lens from the equipment operation benchmark data set. Calculate the actual focusing position coordinates of the laser spot based on the displacement sensor data and compare them with the designed focusing position coordinates to generate the original offset parameters of the focusing position. Combine the influence parameters of ambient temperature on optical refractive index to perform environmental compensation on the original offset parameters of the focusing position, and obtain the laser spot focusing position parameters. Step S34: Using the laser power fluctuation parameter, the drilling feed speed variation parameter, and the laser spot focusing position parameter as the matrix row vector, and the x-axis deviation component and y-axis deviation component of the corrected deviation vector as the matrix column vector, calculate the correlation strength between each parameter and the deviation component using the Pearson correlation coefficient, and construct the drilling deviation influence factor matrix using the correlation strength as the element. Step S35: Perform eigenvalue decomposition on the borehole deviation influencing factor matrix, extract the main eigenvalues and corresponding eigenvectors of the matrix, calculate the initial weight coefficients based on the proportion of each component of the eigenvectors, and then iteratively optimize the initial weight coefficients by combining the actual contribution of each influencing factor in the historical borehole deviation detection data to generate the weight coefficients of each influencing factor on borehole deviation.
9. The PCB board laser drilling misalignment detection method according to claim 8, characterized in that, The thermal effect compensation for the original laser power fluctuation parameters by combining the thermal conductivity parameters of the PCB substrate in step S31 includes the following steps: The substrate type data of the PCB board to be tested is retrieved from the PCB board substrate attribute database. Based on the substrate type data, the corresponding substrate thermophysical property file is matched, and the thermal conductivity parameter and specific heat capacity parameter of the substrate are extracted. The thermal conductivity parameter is used as the core basic parameter for thermal effect compensation. Based on the extracted specific heat capacity parameter, combined with the power peak data in the original laser power fluctuation parameter, the instantaneous heat input rate parameter when the laser acts on the substrate is calculated through the heat conduction equation. Then, based on the instantaneous heat input rate parameter and the substrate thickness data, the initial range parameter of the heat-affected zone of the substrate is generated. Based on the initial range parameters, the correlation between the original fluctuation of laser power and the change of the thermally affected area is analyzed. The correlation coefficient between power fluctuation and thermal effect is obtained by fitting the linear regression algorithm, and the correlation coefficient between power fluctuation and thermal effect is used as the correlation calibration parameter for thermal effect compensation. By substituting the thermal conductivity parameter and the power fluctuation-thermal effect correlation coefficient into the thermal effect compensation model, the power fluctuation amplitude and fluctuation period in the original laser power fluctuation parameter are dynamically corrected to generate the laser power parameter after preliminary compensation. The pulse frequency and pulse width parameters of laser drilling are introduced to perform a secondary calibration on the laser power parameters after preliminary compensation. The power fluctuation stability coefficient after calibration is calculated. If the coefficient meets the preset thermal effect control requirements, the calibrated parameters are determined as the laser power fluctuation parameters. If not, the weight allocation of the thermal effect compensation model is readjusted and the compensation calculation is performed again until the requirements are met.
10. A PCB board laser drilling misalignment detection system, characterized in that, The method includes a processor, a memory, and a computer program stored in the memory and executable on the processor, for performing the PCB board laser drilling misalignment detection method as described in any one of claims 1-9.
Citation Information
Cited By
PCB plug hole flatness detection method and system based on 3D point cloud data
CN121475069A
PCB matching method for circuit design based on different rates
CN121504924A
Mobile phone frame machining hole site detection method and system based on machine vision
CN121540055A
Mobile phone frame hole position detection method and system based on machine vision
CN121540055B
Reference calibration method for size drift of positioning hole of mobile phone shell
CN122149320A