Modeling method and system applied to PCB warping prediction
By extracting multi-level and multi-dimensional physical features from CAM design drawings and fusing them with process parameters, a machine learning model of nonlinear spatial mapping is constructed. This solves the problems of low efficiency and insufficient feature representation in existing PCB warpage prediction technologies, and achieves fast and accurate warpage prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-06
- Publication Date
- 2026-04-03
AI Technical Summary
Existing PCB warpage prediction methods suffer from low modeling efficiency, high information quality requirements, and insufficient feature representation capabilities, making it impossible to achieve fast and accurate warpage prediction under limited data conditions.
By extracting multi-level and multi-dimensional physical features from multi-layer CAM design drawings, combining process parameters, and employing image feature extraction operators and machine learning regression models, nonlinear spatial mapping and dimensionality reduction are performed to construct a fast and accurate warpage prediction model.
It enables fast and accurate warpage prediction under limited data conditions, has good interpretability and low hardware threshold, and is suitable for real-time quality prediction on production lines.
Smart Images

Figure CN121786790A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial manufacturing quality prediction technology, specifically to a modeling method and system for predicting PCB warpage. Background Technology
[0002] PCB warpage is a key indicator of its quality; excessive warpage can lead to serious problems such as poor component soldering and board assembly failures. Existing warpage prediction methods mainly fall into two categories:
[0003] (1) ANSYS (e.g., patent CN202211562348.0) Workbench simulation. Based on various actual and complex situations, reasonable assumptions and simplifications are made to establish a virtual physical model, and a series of equations or systems of equations are solved according to the initial and boundary conditions that conform to the actual engineering situation to simulate the occurrence of real warping;
[0004] Based on deep learning neural network modeling (such as patent CN115114881A), the layout parameters, structural parameters, and process parameters of the target object structure are analyzed, and then fed into the deep learning model to complete the fitting and prediction tasks.
[0005] The principles of the two types of algorithms are as follows:
[0006] Based on ANSYS simulation principles: The PCB model is built using software for equivalent calculations. After setting convection thermal boundary conditions, material parameters, temperature field, degrees of freedom, and other constraints, the warping of each divided region is simulated and calculated using software.
[0007] Based on the principle of deep learning neural network modeling: By converting the structural and layout parameters of the analysis object into numerical vector representations, and combining them with the process parameters obtained from the production environment, the physical characteristics of the plate object are characterized as a whole dataset. The neural network model is trained to fit the data and learn the correlation between multi-dimensional factors and warping in high-dimensional space, thereby achieving the purpose of predicting warping.
[0008] The drawbacks of the two types of algorithms are as follows:
[0009] (1) Based on ANSYS simulation method: a. It requires a large number of constraints for modeling, and the modeling and simulation are interdependent, which requires high accuracy in each link and is prone to cumulative deviation; b. It cannot be directly linked to actual processing parameter information; c. The simulation time is long, it is not efficient, and it has high requirements for computing equipment;
[0010] (2) Modeling based on deep learning neural networks: a. Generally, the original information dimensions are not sufficiently extracted, and there is a lack of high-quality and deep information representation; b. The method itself is inherently unsuitable for structured data modeling tasks; c. It has high requirements for the amount of data and is not suitable for actual production environments.
[0011] Therefore, existing technologies suffer from problems such as low modeling efficiency, high information quality requirements, and insufficient feature representation capabilities. Summary of the Invention
[0012] This invention aims to overcome the aforementioned shortcomings of existing technologies and provide a novel PCB warpage prediction modeling method and system. This method can deeply extract multi-level, multi-dimensional physical features related to the warpage mechanism from multi-layer CAM design drawings and efficiently integrate them with process parameters, thereby achieving fast and accurate warpage prediction under limited data conditions, and the model possesses good interpretability.
[0013] This invention is achieved through the following technical solution:
[0014] A modeling method for PCB warpage prediction includes:
[0015] Obtain the multilayer CAM design drawing of the target PCB board, perform image processing on the CAM design drawing, and extract image feature vectors to characterize the physical distribution state of the board plating layer;
[0016] Obtain the manufacturing process parameters of the target PCB board, perform structured data processing on the process parameters, and construct a process feature vector;
[0017] The image feature vector and the process feature vector are fused to obtain a first fused feature matrix; the first fused feature matrix is subjected to nonlinear spatial mapping and dimensionality reduction to extract a deep fused feature matrix; the first fused feature matrix and the deep fused feature matrix are fused a second time to obtain the final feature matrix.
[0018] Based on the final feature matrix and the corresponding measured PCB warpage values, a machine learning regression model is trained to predict the warpage of new PCBs.
[0019] As an optimization, the specific process for extracting image feature vectors to characterize the physical distribution of the coating on the plate is as follows:
[0020] The multi-layer CAM design of the target PCB board is obtained, and each layer of the CAM design is binarized to obtain multiple corresponding single-layer binary image matrices.
[0021] Based on multiple single-layer binary image matrices, a three-dimensional spatial correlation process is performed to fuse the interlayer information of the target PCB board in order to construct a comprehensive analysis object that can characterize the distribution of the plating along the thickness direction of the PCB board.
[0022] Based on the aforementioned comprehensive analysis object, a multi-granularity feature extraction is performed to extract the distribution characteristics of the coating in the board surface direction and the stacking direction, including:
[0023] (a) Local fine-grained extraction: The comprehensive analysis object is divided into multiple sub-regions. For all or part of the multiple sub-regions, at least one image feature extraction operator suitable for local calculation is applied to the selected sub-regions respectively to obtain a set of local fine-grained feature values.
[0024] (b) Global coarse-grained extraction: At least one image feature extraction operator is applied to the whole of the comprehensive analysis object to obtain at least one global coarse-grained scalar feature value; and / or, statistical calculation is performed on the local fine-grained feature values to generate at least one global coarse-grained scalar feature value;
[0025] The global coarse-grained scalar feature values are concatenated with the set of local fine-grained feature values to form the image feature vector.
[0026] As an optimization, the image feature extraction operator includes a first operator for evaluating the density of the coating distribution; the calculation process of the first operator includes:
[0027] Extract the contours of the coated areas in the comprehensive analysis object, and calculate the ratio of the total perimeter to the total area of all contours as the density feature value.
[0028] As an optimization, the image feature extraction operator includes a second operator for evaluating the symmetry of the coating distribution; the calculation process of the second operator includes:
[0029] The matrix representation of the comprehensive analysis object is divided into two sub-matrices in the horizontal or vertical direction;
[0030] Calculate the difference matrix between the two submatrices;
[0031] Statistical analysis of the difference matrix yields eigenvalues that characterize the symmetry of the distribution.
[0032] As an optimization, the image feature extraction operator includes a third operator for evaluating the uniformity of the coating distribution; the calculation process of the third operator includes:
[0033] The matrix representation of the comprehensive analysis object is divided into multiple grid cells;
[0034] Calculate the coverage area ratio of the coating within each of the grid cells;
[0035] Statistical analysis was performed on the coverage area ratio of all the grid cells to obtain characteristic values representing the uniformity of distribution.
[0036] As an optimization, the image feature extraction operator includes a fourth operator for evaluating the degree of centroid shift; the calculation process of the fourth operator includes:
[0037] Calculate the centroid of the coating region and the centroid of the entire analysis object region, respectively.
[0038] Calculate the Euclidean distance between the two centroids;
[0039] Divide the Euclidean distance by the width and height of the object being analyzed, and take the maximum value of the two as the centroid offset feature value.
[0040] As an optimization, the specific process of constructing the process feature vector is as follows:
[0041] Based on the physical mechanism of PCB warping, new process features are constructed through feature engineering. The new process features are the copper thickness ratio or solder mask thickness ratio between symmetrical layers.
[0042] As an optimization, the specific process of performing nonlinear spatial mapping and dimensionality reduction on the first fused feature matrix is as follows: the first fused feature matrix is processed using the kernel principal component analysis (KPCA) method to capture the nonlinear correlation between image features and process parameters, and the deep fused feature matrix is obtained by dimensionality reduction.
[0043] As an optimization, the machine learning regression model is a gradient boosting decision tree (GBDT) model.
[0044] This invention also discloses a modeling system for PCB warpage prediction, used to execute the aforementioned modeling method for PCB warpage prediction, comprising:
[0045] The image feature vector acquisition module is used to acquire the multilayer CAM design drawing of the target PCB board, perform image processing on the CAM design drawing, and extract image feature vectors to characterize the physical distribution state of the board plating layer;
[0046] The process feature vector construction module is used to obtain the process manufacturing parameters of the target PCB board, perform structured data processing on the process parameters, and construct process feature vectors.
[0047] The fusion module is used to fuse the image feature vector and the process feature vector to obtain a first fused feature matrix; perform nonlinear spatial mapping and dimensionality reduction on the first fused feature matrix to extract a deep fused feature matrix; and perform a second fusion of the first fused feature matrix and the deep fused feature matrix to obtain the final feature matrix.
[0048] The prediction module is used to train a machine learning regression model based on the final feature matrix and the corresponding measured PCB warpage values, so as to predict the warpage of new PCB boards.
[0049] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0050] This invention uses a specially designed image feature extraction operator to directly extract multi-level (global / local) and multi-dimensional (in-plane / inter-layer) features that are strongly correlated with the physical mechanism of warping from CAM images, with clear physical meaning of the features.
[0051] The method of this invention is friendly to small sample data and does not require massive training data; at the same time, feature extraction and model training are fast, which can meet the needs of rapid prediction on the production line.
[0052] This invention fuses image features and process parameters in a nonlinear space using Kernel PCA, which can capture complex intrinsic relationships and improve the model's representation ability and prediction accuracy.
[0053] The solution of this invention has low hardware requirements and can be integrated into existing production systems, providing real-time and accurate decision support for process optimization and quality control. Attached Figure Description
[0054] The accompanying drawings, which are included to provide a further understanding of embodiments of the invention and form part of this application, do not constitute a limitation thereof. In the drawings:
[0055] Figure 1 This is a flowchart of the PCB warpage prediction modeling method provided in the embodiments of the present invention;
[0056] Figure 2 This is a schematic diagram illustrating the principle of multi-layer CAM image information processing and vectorization conversion.
[0057] Figure 3 A flowchart illustrating the abstract extraction process from multi-layer CAM design drawings to feature sets;
[0058] Figure 4 This is a schematic diagram illustrating the method for extracting global information in the XYZ directions.
[0059] Figure 5 This is a schematic diagram of the feature fusion mapping process;
[0060] Figure 6 This is a comparison chart of the predicted results and the actual value distribution in the example. Detailed Implementation
[0061] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention.
[0062] As attached Figure 1 As shown, a CAM diagram is essentially a series of printed circuit distribution images. The red areas represent the corresponding plating materials (such as copper, solder resist ink, etc.). Therefore, the distribution information presented in the image directly expresses the symmetrical stress situation on the PCB board corresponding to the CAM design to a certain extent.
[0063] In the current scenario, the key information dimension is the process manufacturing data, which exists in a tabular and structured form. Therefore, in order to integrate the CAM diagram information with the process manufacturing data information and use them together for modeling tasks, it is necessary to extract the information from the CAM diagram and convert it into structured data in the same form as the process manufacturing data, and then merge them.
[0064] As an image, a CAM image is essentially a numerical matrix containing RGB channels. Therefore, image processing and matrix operations can be used to obtain information of interest within a given scene. For example, the most crucial aspect of this scene is distribution symmetry. This can be obtained by directly dividing the numerical matrix into left and right or top and bottom parts on the same image (i.e., the same layer) and performing matrix subtraction. Alternatively, the symmetry between different layers can be obtained by subtracting between two images (different layers).
[0065] Using the above method, the image matrix can be directly processed into a matrix expressing the information of interest through target operations. Then, by processing the matrix (such as finding the maximum, average, or standard deviation of the matrix after subtraction), one or more numerical values with characterization can be obtained. These numerical values are combined to form vector data, which can be directly spliced onto the manufacturing process data (matrix splicing), thus completing the process of providing information on the CAM drawing corresponding to a PCB board.
[0066] Next, the implementation process of the present invention will be described in detail.
[0067] This embodiment 1 provides a modeling method for predicting PCB warpage, such as... Figure 1-5 As shown, it includes steps S1-S4.
[0068] S1. Obtain the multilayer CAM design drawing of the target PCB board, perform image processing on the CAM design drawing, and extract image feature vectors to characterize the physical distribution state of the board plating.
[0069] In some embodiments, the specific process of extracting image feature vectors to characterize the physical distribution state of the plate coating is as follows:
[0070] S1.1 Obtain the multi-layer CAM design drawing of the target PCB board, and perform binarization processing on each layer of the CAM design drawing to obtain the corresponding multiple single-layer binary image matrices;
[0071] S1.2. Based on the multiple single-layer binary image matrices, perform three-dimensional spatial correlation processing aimed at fusing interlayer information of the target PCB board to construct a comprehensive analysis object that can characterize the distribution of the plating along the thickness direction of the PCB board.
[0072] The multiple single-layer binary image matrices obtained in step S1.1 are conceptually considered as a dataset stacked from top to bottom along the virtual Z-axis (i.e., the thickness direction) of the PCB board. Each layer matrix represents a plating distribution on the XY plane. Through this stacking association, the originally scattered multi-layer two-dimensional information is integrated into a virtual three-dimensional volume data that can characterize the distribution state of the plating in three-dimensional space (X, Y, Z), which is the comprehensive analysis object.
[0073] Based on this comprehensive analysis object, subsequent feature extraction operations acquire three-dimensional geometric meaning. For example, calculating whether a coating exists from the top layer to the bottom layer at a certain XY coordinate point (i.e., connectivity in the Z direction) can assess the vertical support strength at that point; comparing the coating distribution differences of symmetrical layers (such as the top and bottom layers) in the same XY region can assess the interlayer mirror symmetry. Therefore, operations on this object are equivalent to performing them simultaneously in the X, Y, and Z directions, such as... Figure 4 As shown.
[0074] In this scheme, by stacking multiple layers, the geometric meaning in the height Z direction is acquired. At this point, performing information extraction calculations on the target area or the entire board is equivalent to simultaneously performing calculations on... In three directions.
[0075] S1.3. Based on the aforementioned comprehensive analysis object, perform multi-granularity feature extraction aimed at extracting the distribution characteristics of the coating in the board surface direction and the stacking direction, including:
[0076] (a) Local fine-grained extraction: The comprehensive analysis object is divided into multiple sub-regions. For all or part of the multiple sub-regions, at least one image feature extraction operator suitable for local calculation is applied to the selected sub-regions respectively to obtain a set of local fine-grained feature values.
[0077] (b) Global coarse-grained extraction: At least one image feature extraction operator is applied to the whole of the comprehensive analysis object to obtain at least one global coarse-grained scalar feature value; and / or, statistical calculations are performed on the local fine-grained feature values (such as calculating their mean, maximum, minimum or range) to generate at least one global coarse-grained scalar feature value;
[0078] S1.4. The global coarse-grained scalar feature value is concatenated with the set of local fine-grained feature values to form the image feature vector.
[0079] In some embodiments, the image feature extraction operator includes a first operator for evaluating the density of coating distribution; the calculation process of the first operator includes:
[0080] The contours of the coating regions in the comprehensive analysis object are extracted using the contour finding method provided by OpenCV. The ratio of the total perimeter to the total area of all contours is calculated and used as the density feature value k. The calculation formula is as follows:
[0081] .
[0082] In some embodiments, the image feature extraction operator includes a second operator for evaluating the symmetry of the coating distribution; the calculation process of the second operator includes:
[0083] The matrix representation of the comprehensive analysis object is divided into two sub-matrices in either the horizontal or vertical direction. and ;
[0084] Calculate the difference matrix between the two submatrices. ;
[0085] Statistical analysis of the difference matrix yields eigenvalues characterizing the symmetry of the distribution, such as the maximum value. ,average value wait.
[0086] The CAM image matrix can be directly divided into two parts, A and B, in the horizontal or vertical direction, and then the target information can be obtained by directly performing matrix operations.
[0087] In some embodiments, the image feature extraction operator includes a third operator for evaluating the uniformity of the coating distribution; the calculation process of the third operator includes:
[0088] The matrix representation of the comprehensive analysis object is divided into multiple grid cells, and the total number of pixels in the i-th, j-th grid is denoted as . The total number of grids is ;
[0089] Calculate the sum of the number of pixels with coating within each grid cell, which is taken as the coating coverage area within that region. ;
[0090] Statistical analysis of the coverage area ratio of all the grid cells yields a characteristic value k representing the uniformity of distribution, calculated using the following formula:
[0091] .
[0092] In some embodiments, the image feature extraction operator includes a fourth operator for evaluating the degree of centroid shift; the calculation process of the fourth operator includes:
[0093] Calculate the centroid coordinates of the coating region in the comprehensive analysis object respectively. and the centroid coordinates of the entire analysis object region ;
[0094] The width and height of the entire analysis object are denoted as w and h, respectively;
[0095] calculate and Euclidean distance, denoted as , ;
[0096] Divide the Euclidean distance by the width and height of the object being analyzed, and take the maximum value of the two as the centroid offset characteristic value k. The calculation formula is as follows: .
[0097] In some embodiments, the specific implementation process of S1.3 is as follows:
[0098] (a) Local Fine-Grained Extraction: This step aims to obtain local detailed information about the PCB board plating distribution. Specifically, the comprehensive analysis object (or its two-dimensional matrix representation) is spatially divided (usually the XY plane) into multiple continuous or discrete sub-regions (e.g., uniformly divided into m×n rectangular grids, denoted as m×n). Subsequently, the selected image feature extraction operators (such as those evaluating uniformity and symmetry) are applied independently to each sub-region. Within each sub-region, the operator calculates one or more feature values based on the image data of that local region. The output of this step is a set or sequence of feature values from all sub-regions, i.e., a set of local fine-grained feature values. This set of data directly characterizes the spatial distribution details of the coating properties on the board surface, and its data organization belongs to fine-grained features. For example, if the coverage is calculated for each grid, the output is a vector. ,in It is a grid Coverage rate.
[0099] (b) Global coarse-grained extraction: This step aims to obtain overall, generalized information about the PCB board plating distribution. This is achieved through one or a combination of the following two methods:
[0100] (b.1) Direct Global Computation: The selected image feature extraction operator is directly applied to the entirety of the object being analyzed (i.e., the complete dataset). The operator computes one or more generalized scalar feature values based on the global data of the entire object, such as the centroid offset of the entire plate. Or the maximum value of overall symmetry difference These values are directly used as global coarse-grained scalar feature values.
[0101] (b.2) Statistical Summary Based on Local Features: A statistical aggregation calculation is performed on the set of local fine-grained feature values obtained in step (a) above. For example, the mean of this set of feature values is calculated to reflect the overall average level, the maximum or minimum value is calculated to reflect extreme cases, or the range (the difference between the maximum and minimum values) is calculated to reflect the overall degree of fluctuation. The results of such statistical calculations (such as the mean) The range (R) generates new global coarse-grained scalar feature values that are extracted from local details.
[0102] The output of step (b) is one or more scalar values that characterize the properties of the coating distribution at a holistic level, and their data organization is coarse-grained.
[0103] The set of local fine-grained feature values and at least one global coarse-grained scalar feature value output from steps (a) and (b) will be used together as source material in subsequent step S1.4 and concatenated to form the final image feature vector for use in subsequent modeling. This design ensures that the final feature vector contains both detailed local spatial details and highly generalized global attributes.
[0104] Depending on the problem being solved, appropriate operators are selected for application to the local mesh. The most natural and commonly used is the local form of the uniformity operator, which calculates the coverage of each mesh. Symmetry operators and centroid offset operators are more suitable for global or larger areas.
[0105] A PCB board typically consists of at least two layers. When a specific layer is taken as the target unit, the layer is considered as a horizontal plane and must have at least the following characteristics: Both directions, when performing operations on a single layer, represent the information extracted. Information in dimensions.
[0106] S2. Obtain the process manufacturing parameters of the target PCB board, perform structured data processing on the process parameters, and construct a process feature vector.
[0107] In some embodiments, the specific process of constructing a process feature vector includes the following steps:
[0108] S2.1 Data Cleaning: Preprocessing the acquired process manufacturing parameters. The preprocessing includes: identifying and removing unreasonable data or outliers; for features with missing values, using methods such as filling, interpolation, or default value assignment based on business rules to ensure data consistency and integrity.
[0109] S2.2 Feature Encoding: Encoding and transforming non-numerical or non-standard format structured features in process manufacturing parameters. For example, target encoding or one-hot encoding is used for categorical variables to convert them into numerical features that the model can effectively learn.
[0110] S2.3 Feature Engineering: Based on the physical mechanisms of PCB warpage and business knowledge, new features are constructed on the cleaned and coded data to enhance the model's understanding of the process-performance relationship. Specifically:
[0111] In current PCB warpage modeling and prediction tasks, combined with analysis of actual business problems, the copper thickness, solder mask thickness, and symmetry of the distribution between symmetrical layers directly determine the board's bending resistance. Therefore, considering the ratio of copper thickness in symmetrical layers to measure the difference in copper thickness information on symmetrical layers is more in line with actual business problems and can provide the model with more intuitive feature information. For example, for a pair of symmetrical layers (such as the top and bottom layers), calculate their copper thickness ratio and solder mask thickness ratio:
[0112] The formula for calculating the copper thickness ratio is: Copper thickness ratio = Copper thickness of layer 1 / Copper thickness of layer 2. Here, layer 1 and layer 2 are a pair of symmetrical layers.
[0113] The formula for calculating the solder mask thickness ratio is: Solder mask thickness ratio = solder mask thickness of layer 1 / solder mask thickness of layer 2.
[0114] In actual coding implementation, the above ratios are achieved through division operations between matrix (or vector) elements of the corresponding process parameter columns. These newly constructed ratio features can intuitively quantify the degree of asymmetry of the symmetric layer in the thickness of the critical material, providing the model with strong information closely related to the warping physical mechanism.
[0115] S2.4 Vectorization: All process parameter features (including original features and newly constructed features) obtained after cleaning, encoding and feature engineering are combined in sequence to form the process feature vector.
[0116] S3. The image feature vector and the process feature vector are fused to obtain a first fused feature matrix; the first fused feature matrix is subjected to nonlinear spatial mapping and dimensionality reduction to extract a deep fused feature matrix; the first fused feature matrix and the deep fused feature matrix are fused a second time to obtain the final feature matrix.
[0117] In some embodiments, step S3 specifically includes the following sub-steps:
[0118] S3.1 Data concatenation to obtain the first fused feature matrix:
[0119] The image feature vector (denoted as matrix MA) obtained in step S1 and the process feature vector (denoted as matrix MB) obtained in step S2 are concatenated horizontally (i.e., along the column direction of the matrix). Specifically, if the dimension of MA is N×p and the dimension of MB is N×q (where N is the number of samples, and p and q are the dimensions of the image features and process features, respectively), then the dimension of the first fused feature matrix M obtained after concatenation is N×(p+q), that is:
[0120] ;
[0121] This step directly aligns and merges features from different data sources (image domain and process parameter domain) in the sample dimension to form a preliminary joint feature space.
[0122] S3.2 Nonlinear mapping and dimensionality reduction to extract deep fusion feature matrices:
[0123] In order to capture the complex and nonlinear intrinsic relationship between the image features and process parameters, and to purify the initially fused high-dimensional features, this step performs nonlinear transformation and dimensional compression on the first fused feature matrix M.
[0124] Specifically, kernel principal component analysis is used to achieve this:
[0125] Kernel function selection and mapping: First, a suitable kernel function (such as a radial basis function, a polynomial kernel function, etc.) is selected. This kernel function implicitly maps the samples in matrix M from the original (p+q)-dimensional feature space to a higher-dimensional reproducing kernel Hilbert space. This mapping process can reveal nonlinear interaction patterns between the original features that are difficult to describe with linear relationships.
[0126] Kernel principal component extraction and dimensionality reduction: In the high-dimensional feature space, perform principal component analysis. Calculate the eigenvalues and eigenvectors of the kernel matrix, and select the eigenvectors corresponding to the top k largest eigenvalues as the principal directions (i.e., kernel principal components). Project the original data onto these kernel principal components to obtain a new, dimension-reduced (N×k, usually k < p+q) feature matrix, denoted as the deep fusion feature matrix K. The features in matrix K are more discriminative fusion representations extracted after considering the non-linear interaction relationship between the image and process parameters.
[0127] S3.3. Secondary fusion to obtain the final feature matrix:
[0128] Horizontally splice the first fusion feature matrix M containing the original information obtained in step S3.1 and the deep fusion feature matrix K containing deep non-linear associations obtained in step S3.2 again to obtain the final feature matrix X:
[0129] ;
[0130] The final feature matrix X retains both the complete information of the original features and the deep abstract information mined through non-linear fusion, providing comprehensive and discriminative input data for subsequent machine learning modeling.
[0131] S4. Train a machine learning regression model based on the final feature matrix and the corresponding measured PCB warpage values for warpage prediction of new PCB boards.
[0132] In some embodiments, step S4 specifically includes the following sub-steps:
[0133] S4.1. Dataset construction and division:
[0134] Denote the final feature matrix obtained in step S3 as X, and each row of it corresponds to the fusion feature vector of a PCB board sample. Obtain the measured PCB warpage values corresponding to each sample to form the target vector Y. Randomly divide the dataset {X, Y} into a training set and a test set according to a preset ratio (such as 7:3 or 8:2). Optionally, a part can be further divided from the training set as a validation set for hyperparameter tuning and preventing overfitting.
[0135] S4.2. Model training and optimization:
[0136] Select a machine learning regression model and train it on the training set to learn the mapping function f: X → Y from the fusion features to the warpage values.
[0137] In one specific embodiment, the machine learning regression model is a gradient boosting decision tree model. The training process includes:
[0138] Model initialization: Set the hyperparameters of the GBDT model, such as the number of trees, learning rate, maximum tree depth, and minimum number of samples per leaf node. These parameters can be tuned using methods such as grid search, random search, or Bayesian optimization, combined with validation set performance.
[0139] Iterative construction: Multiple decision trees are constructed sequentially, using the negative gradient (i.e., residual) as the fitting target of the current model. The learning objective of each new tree is to correct the prediction residuals of the previous tree set. This additive model gradually reduces the loss function (such as mean squared error).
[0140] Regularization and Early Stopping: Regularization techniques such as learning rate shrinkage and subsampling are used to control model complexity and prevent overfitting. An early stopping mechanism can be triggered when performance on the validation set no longer improves to terminate training and obtain the model with the best generalization ability.
[0141] S4.3 Model Evaluation:
[0142] Use the trained model on the test set Make a prediction and obtain the predicted value. .
[0143] Predicted values Compared with the true value The comparisons are then performed, and evaluation metrics are calculated to quantify model performance. Commonly used regression evaluation metrics include mean squared error, mean absolute error, and coefficient of determination. This step is used to objectively evaluate the model's generalization and predictive ability on unseen data.
[0144] S4.4 Prediction Applications:
[0145] The trained, evaluated, and validated final model is then deployed in a real-world application environment. For a new PCB board, steps S1 to S3 are repeated to extract its corresponding fused feature vector. The input is fed into the model, and its warpage prediction value will be output. .
[0146] Through the above steps, the method provided by this invention can achieve rapid model training in minutes on limited sample data (e.g., 500 samples). The trained model has a single-sample prediction speed in milliseconds, which can meet the needs of real-time or near-real-time quality prediction on production lines. Figure 6 As shown, the predicted value Compared with the true value The distributions are highly consistent, verifying that the method can still achieve high-precision warp prediction on smaller datasets.
[0147] Example 2 discloses a modeling system for PCB warpage prediction, used to execute the modeling method for PCB warpage prediction described in Example 1, including:
[0148] The image feature vector acquisition module is used to acquire the multilayer CAM design drawing of the target PCB board, perform image processing on the CAM design drawing, and extract image feature vectors to characterize the physical distribution state of the board plating layer;
[0149] The process feature vector construction module is used to obtain the process manufacturing parameters of the target PCB board, perform structured data processing on the process parameters, and construct process feature vectors.
[0150] The fusion module is used to fuse the image feature vector and the process feature vector to obtain a first fused feature matrix; perform nonlinear spatial mapping and dimensionality reduction on the first fused feature matrix to extract a deep fused feature matrix; and perform a second fusion of the first fused feature matrix and the deep fused feature matrix to obtain the final feature matrix.
[0151] The prediction module is used to train a machine learning regression model based on the final feature matrix and the corresponding measured PCB warpage values, so as to predict the warpage of new PCB boards.
[0152] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A modeling method for predicting PCB warpage, characterized in that, include: Obtain the multilayer CAM design drawing of the target PCB board, perform image processing on the CAM design drawing, and extract image feature vectors to characterize the physical distribution state of the board plating layer; Obtain the manufacturing process parameters of the target PCB board, perform structured data processing on the process parameters, and construct a process feature vector; The image feature vector and the process feature vector are fused to obtain a first fused feature matrix; The first fusion feature matrix is subjected to nonlinear spatial mapping and dimensionality reduction to extract the deep fusion feature matrix; The first fused feature matrix and the deep fused feature matrix are fused a second time to obtain the final feature matrix; Based on the final feature matrix and the corresponding measured PCB warpage values, a machine learning regression model is trained to predict the warpage of new PCBs.
2. The modeling method for PCB warpage prediction according to claim 1, characterized in that, The specific process for extracting image feature vectors to characterize the physical distribution of the coating on the plate is as follows: The multi-layer CAM design of the target PCB board is obtained, and each layer of the CAM design is binarized to obtain multiple corresponding single-layer binary image matrices. Based on multiple single-layer binary image matrices, a three-dimensional spatial correlation process is performed to fuse the interlayer information of the target PCB board in order to construct a comprehensive analysis object that can characterize the distribution of the plating along the thickness direction of the PCB board. Based on the aforementioned comprehensive analysis object, a multi-granularity feature extraction is performed to extract the distribution characteristics of the coating in the board surface direction and the stacking direction, including: (a) Local fine-grained extraction: The comprehensive analysis object is divided into multiple sub-regions. For all or part of the multiple sub-regions, at least one image feature extraction operator suitable for local calculation is applied to the selected sub-regions respectively to obtain a set of local fine-grained feature values. (b) Global coarse-grained extraction: At least one image feature extraction operator is applied to the whole of the comprehensive analysis object to obtain at least one global coarse-grained scalar feature value; and / or, statistical calculation is performed on the local fine-grained feature values to generate at least one global coarse-grained scalar feature value; The global coarse-grained scalar feature values are concatenated with a set of local fine-grained feature values to form the image feature vector.
3. The modeling method for PCB warpage prediction according to claim 2, characterized in that, The image feature extraction operator includes a first operator for evaluating the density of the coating distribution; The calculation process of the first operator includes: Extract the contours of the coated areas in the comprehensive analysis object, and calculate the ratio of the total perimeter to the total area of all contours as the density feature value.
4. The modeling method for PCB warpage prediction according to claim 2, characterized in that, The image feature extraction operator includes a second operator for evaluating the symmetry of the coating distribution; the calculation process of the second operator includes: The matrix representation of the comprehensive analysis object is divided into two sub-matrices in the horizontal or vertical direction; Calculate the difference matrix between the two submatrices; Statistical analysis of the difference matrix yields eigenvalues that characterize the symmetry of the distribution.
5. The modeling method for PCB warpage prediction according to claim 2, characterized in that, The image feature extraction operator includes a third operator for evaluating the uniformity of the coating distribution; the calculation process of the third operator includes: The matrix representation of the comprehensive analysis object is divided into multiple grid cells; Calculate the coverage area ratio of the coating within each of the grid cells; Statistical analysis was performed on the coverage area ratio of all the grid cells to obtain characteristic values representing the uniformity of distribution.
6. The modeling method for PCB warpage prediction according to claim 2, characterized in that, The image feature extraction operator includes a fourth operator for evaluating the degree of centroid shift; the calculation process of the fourth operator includes: Calculate the centroid of the coating region and the centroid of the entire analysis object region, respectively. Calculate the Euclidean distance between the two centroids; Divide the Euclidean distance by the width and height of the object being analyzed, and take the maximum value of the two as the centroid offset feature value.
7. The modeling method for PCB warpage prediction according to claim 1, characterized in that, The specific process of constructing the process feature vector is as follows: Based on the physical mechanism of PCB warping, new process features are constructed through feature engineering. The new process features are the copper thickness ratio or solder mask thickness ratio between symmetrical layers.
8. The modeling method for PCB warpage prediction according to claim 1, characterized in that, The specific process of performing nonlinear spatial mapping and dimensionality reduction on the first fusion feature matrix is as follows: the first fusion feature matrix is processed using the kernel principal component analysis method to capture the nonlinear correlation between image features and process parameters, and the deep fusion feature matrix is obtained by dimensionality reduction.
9. The modeling method for PCB warpage prediction according to claim 1, characterized in that, The machine learning regression model is a gradient boosting decision tree model.
10. A modeling system for PCB warpage prediction, used to execute the modeling method for PCB warpage prediction as described in any one of claims 1-9, characterized in that, include: The image feature vector acquisition module is used to acquire the multilayer CAM design drawing of the target PCB board, perform image processing on the CAM design drawing, and extract image feature vectors to characterize the physical distribution state of the board plating layer; The process feature vector construction module is used to obtain the process manufacturing parameters of the target PCB board, perform structured data processing on the process parameters, and construct process feature vectors. The fusion module is used to fuse the image feature vector and the process feature vector to obtain a first fusion feature matrix; The first fusion feature matrix is subjected to nonlinear spatial mapping and dimensionality reduction to extract the deep fusion feature matrix; The first fused feature matrix and the deep fused feature matrix are fused a second time to obtain the final feature matrix; The prediction module is used to train a machine learning regression model based on the final feature matrix and the corresponding measured PCB warpage values, so as to predict the warpage of new PCB boards.
Citation Information
Patent Citations
Simulation method and device of PCB warping degree, readable storage medium and electronic equipment
CN115758968A