A method for setting substrate thickness threshold for ultrasonic short circuit detection of PCBA boards
By setting multiple thresholds in the ultrasonic short-circuit detection of PCBA boards and filtering samples using machine learning system, the problem of short-circuit detection accuracy of multi-layer PCBA boards is solved, achieving more efficient and accurate detection effects.
Patent Information
- Application Number
- CN202411258483.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2044-09-09
AI Technical Summary
For PCBA boards with multi-layer or complex structures, short circuits inside or hidden under components are difficult to detect directly, and the thickness and material of the ultrasonic detection substrate will affect the accuracy of the detection.
By setting prediction thresholds, transition thresholds and final thresholds, the samples are screened using a machine learning system, and combined with ultrasonic detection, the substrate plate thickness threshold is gradually determined to improve the accuracy of short-circuit detection.
It reduces the computational volume of machine learning systems, improves the accuracy of thresholds, enhances the robustness and generalization capabilities of detection, and ensures the effectiveness of the final thresholds.
Smart Images

Figure CN119167171B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of PCBA short circuit detection, and in particular to a method for setting a substrate thickness threshold for ultrasonic short circuit detection of a PCBA board. Background Art
[0002] The entire process of PCB blank board going through SMT mounting and DIP plug-in welding is referred to as PCBA. After SMT and DIP plug-in welding, the finished PCBA cannot guarantee the correct welding of electronic components welded on the PCBA, such as lack of welding, cold welding, short circuit and other phenomena. In order to pick out bad PCBA from good products and repair them, and reduce the probability of rework and rework in subsequent processes, inspection is required.
[0003] Existing PCBA detection methods include thermal imaging detection, ultrasonic detection, short circuit detector detection, X-ray detection, etc. For PCBA boards with multiple layers or complex structures, short circuits inside or hidden under components may be difficult to detect directly. Therefore, ultrasonic short circuit detection for PCBA boards with multiple layers or complex structures has appeared on the market. However, the thickness and material of the ultrasonic detection substrate will affect the accuracy of ultrasonic short circuit detection. Therefore, it is necessary to confirm the thickness threshold of the substrate and perform ultrasonic infrared detection on multi-layer PCBA boards with a substrate thickness less than the thickness threshold to enhance the accuracy of short circuit detection. Therefore, a substrate thickness threshold setting method for ultrasonic short circuit detection of PCBA boards is proposed to solve the above problem. Summary of the invention
[0004] 1. Technical issues to be resolved
[0005] The purpose of the present invention is to solve the problem that short circuits inside or hidden under components of a PCBA board with multiple layers or complex structures may be difficult to detect directly. Therefore, ultrasonic short circuit detection for PCBA boards with multiple layers or complex structures has appeared on the market. However, the thickness and material of the ultrasonic detection substrate will affect the accuracy of ultrasonic short circuit detection. Therefore, it is necessary to confirm the thickness threshold of the substrate and perform ultrasonic infrared detection on the multi-layer PCBA board with a substrate thickness less than the thickness threshold to enhance the accuracy of short circuit detection. A method for setting the substrate thickness threshold for ultrasonic short circuit detection of PCBA boards is proposed.
[0006] (II) Technical solution
[0007] The technical solution of the present invention to solve the above technical problems is as follows:
[0008] A method for setting a substrate thickness threshold for ultrasonic short circuit detection of a PCBA board, characterized in that it comprises the following steps:
[0009] S1: Take U PCBA multilayer boards with short circuit defects as the sample set and divide the sample set into a training sample set m, a to-be-tested sample set n and a to-be-verified sample set q;
[0010] S2: Take the training sample set m and classify it into type i substrate according to the substrate material , measure the thickness of the substrate, and use ultrasound to perform short circuit detection on all PCBA multilayer boards in m in turn to obtain i sets of data sets;
[0011] S3: Preprocess the short circuit detection results, compare the processed data with the actual short circuit defect, and find the maximum substrate thickness when the judgment accuracy is 1 as the prediction threshold;
[0012] S4: input the prediction threshold into the machine learning system, take the sample set n to be tested and put it into the machine learning system, and screen out the test sample set through the machine learning system;
[0013] S5: Use ultrasonic waves to perform short circuit detection on the test sample set, compare the test results with the actual defect conditions of the test samples, calculate the test accuracy, and confirm the transition threshold through the test accuracy;
[0014] S6: Replace the prediction threshold with the transition threshold and input it into the machine learning system, take the sample set q to be verified and put it into the machine learning system, and screen out the verification sample set through the machine learning system;
[0015] S7: Use ultrasound to perform short circuit detection on the verification sample set, compare the verification test results with the actual defect conditions of the verification samples, calculate the verification accuracy, and confirm the final threshold value through the verification accuracy.
[0016] Based on the above technical solution, the present invention can also be improved as follows.
[0017] Preferably, the S1 specifically includes:
[0018] Take U PCBA multilayer boards with short circuit defects as the sample set, and divide the sample set into training sample set m, test sample set n and verification sample set q in a ratio of 3:3:4 by random allocation.
[0019] Preferably, the S3 specifically includes:
[0020] Preprocess the data in the i-group data set, compare the processed data with the actual short-circuit defect, and establish i N-row and 2-column arrays respectively. N is a non-fixed value, and its value is the same as the number of subsets in the data set. The first column is the substrate thickness, and the second column is the judgment accuracy. Use the maximum value search algorithm to find the maximum substrate thickness when the accuracy is 1 , , , , , the maximum substrate thickness , , , , as a prediction threshold;
[0021] The preprocessing is a sum normalization process, and the formula is:
[0022]
[0023] Where n is the total number of data in the data set, and j is the jth data in the data set;
[0024] The judgment accuracy formula is:
[0025]
[0026] in To determine the accuracy, To determine the correct number, is the total number of short-circuit defects;
[0027] The maximum value finding algorithm includes:
[0028] 1) Traverse the second column of i N-row, 2-column arrays and find the number of rows with a value of 1;
[0029] 2) Compare the values in the first column of the rows with a value of 1 and find the maximum value among i arrays with N rows and 2 columns;
[0030] 3) The maximum value among i N-row and 2-column arrays is , , , , as output.
[0031] Preferably, the S4 specifically includes:
[0032] Input i prediction thresholds into the machine learning system, take the set of samples to be tested n and put them into the machine learning system. The machine learning system first determines the type of PCBA multilayer board, and then retains the samples to be tested that are less than or equal to i prediction thresholds according to the type of PCBA multilayer board, and classifies them into test sample sets according to the type of PCBA multilayer board , test sample set , test sample set , , test sample set , according to the type of PCBA multilayer board, the samples to be tested that are greater than i prediction thresholds are eliminated.
[0033] Preferably, the S5 specifically includes:
[0034] The test sample set described in S4 , test sample set , test sample set , , test sample set Use ultrasonic waves to perform short circuit detection on all PCBA multilayer boards, compare the test results of group i with the actual defect conditions of group i test samples, calculate the test accuracy, and determine whether the test accuracy of group i reaches the expected value of the test;
[0035] S5.1: A set of test samples in group i where the test accuracy reaches the test expected value, confirming that the corresponding prediction threshold is a transition threshold;
[0036] S5.2: For the test sample set in group i where the test accuracy does not reach the test expected value, its corresponding prediction threshold needs to be corrected to obtain the transition threshold;
[0037] The test accuracy formula is:
[0038]
[0039] in To test accuracy, To determine the number of test samples with a precision of 1, is the total number of subsets in the test sample set.
[0040] Preferably, the S6 specifically includes:
[0041] Input i transition thresholds into the machine learning system and replace the original i prediction thresholds. Take the sample set q to be verified and put it into the machine learning system. The machine learning system first determines the type of PCBA multilayer board, and then retains the samples to be tested that are less than or equal to i determination thresholds according to the type of PCBA multilayer board, and classifies them into verification sample sets according to the type of PCBA multilayer board. , validation sample set , validation sample set , , validation sample set , according to the type of PCBA multilayer board, the samples to be verified that are greater than i transition thresholds are eliminated.
[0042] Preferably, the S7 specifically includes:
[0043] S7: Collect the validation samples described in S6 , validation sample set , validation sample set , , validation sample set Use ultrasonic waves to perform short circuit detection on all PCBA multilayer boards, compare the verification test results of group i with the actual defect conditions of group i test samples, calculate the verification accuracy, and determine whether the verification accuracy of group i reaches the verification expectation;
[0044] S7.1: The validation sample set in group i whose validation accuracy reaches the validation expectation value is confirmed to have its transition threshold as the final threshold;
[0045] S7.2: For the validation sample set in group i, whose validation accuracy does not reach the validation expectation, consider the influence of temperature and humidity on the test results, and introduce temperature factor and humidity factor into the transition threshold as its final threshold, so that the validation accuracy of the final threshold reaches the validation expectation;
[0046] The verification accuracy formula is:
[0047]
[0048] in To verify the accuracy, is the number of validation samples for determining the accuracy of 1. is the total number of subsets in the validation sample set.
[0049] Preferably, the specific process of the correction processing in S5.2 includes:
[0050] by The prediction threshold is incremented, and the test sample set is short-circuited using ultrasound. The test results are compared with the actual defect conditions of the test samples, and the test accuracy is calculated to determine whether the detection accuracy of group i reaches the test expectation. If the detection accuracy of group i does not reach the test expectation, continue with The prediction threshold is incremented. When the detection accuracy of group i reaches the expected value of the test, the prediction threshold after this increment is used as the transition threshold. The increment formula is:
[0051]
[0052] in is the prediction threshold for the dth increment operation, is the prediction threshold without incrementing, is the standard deviation of the test sample set, Incremental times.
[0053] Preferably, the specific process of introducing the temperature factor and the humidity factor into the transition threshold as the final threshold in S7.2 includes:
[0054] Establish a polynomial model. The polynomial model formula is as follows:
[0055]
[0056] in, is the final threshold, is the temperature factor, is the humidity factor, is the first fitting parameter, is the second fitting parameter, is the third fitting parameter, is the fourth fitting parameter, is the fifth fitting parameter, is the transition threshold;
[0057] Collect validation samples to verify the accuracy of the machine learning system under different temperature and humidity conditions , the verification accuracy of the verification sample set , the temperature and humidity are recorded one by one, and the first fitting parameter to the fifth fitting parameter are estimated by the least square method. After the estimation is completed, the OWL-QN algorithm is introduced;
[0058] Then, the test sample set n and the verification sample set q were brought into different temperature and humidity conditions to verify the accuracy of the polynomial model by cross-validation method. The accuracy of the polynomial model was verified to reach 99.7%. The first fitting parameter to the fifth fitting parameter were used as the final parameters. is the final threshold. When the accuracy of the verification polynomial model is less than 99.7%, the first fitting parameters to the fifth fitting parameters are adjusted again by the least squares method according to the data under different temperature and humidity conditions of the sample set n to be tested and the sample set q to be verified, until the adjusted first fitting parameters to the fifth fitting parameters meet any data in the training sample set m, the sample set n to be tested and the sample set q to be verified.
[0059] Preferably, in the process of estimating the first fitting parameter to the fifth fitting parameter by the least square method, ;
[0060] right The value of is judged, if , then this verification sample set is eliminated, and Z PCBA multilayer boards with short circuit defects are randomly selected as the verification sample set, and the above process is repeated until ;
[0061] like , then this time The final threshold value The composition value of .
[0062] (III) Beneficial effects
[0063] Compared with the prior art, the technical solution of this application has the following beneficial technical effects:
[0064] 1. The present invention can reduce the amount of calculation of the subsequent machine learning system by setting a prediction threshold to eliminate redundant data in the sample, reduce the complexity of the calculation, and enable the machine learning system to obtain the final threshold more quickly.
[0065] 2. The present invention sets a prediction threshold, a transition threshold and a final threshold, and gradually makes the threshold obtained by the machine learning system closer to the actual value through the three thresholds, thereby ensuring the accuracy of the final threshold.
[0066] 3. The present invention prevents overfitting by setting the OWL-QN algorithm, thereby enhancing the generalization ability of the machine learning system and the robustness of the final threshold. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 It is a schematic diagram of the process of the present invention;
[0068] Figure 2 For the present invention A logical judgment diagram for judging the value of . DETAILED DESCRIPTION
[0069] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0070] A method for setting a substrate thickness threshold for ultrasonic short circuit detection of a PCBA board, characterized in that it comprises the following steps:
[0071] S1: Take U PCBA multilayer boards with short circuit defects as the sample set and divide the sample set into a training sample set m, a to-be-tested sample set n and a to-be-verified sample set q;
[0072] It should be noted that the number of PCBA multilayer board substrates of U PCBA multilayer boards with short circuit defects is the same.
[0073] S2: Take the training sample set m and classify it into type i substrate according to the substrate material , measure the thickness of the substrate, and use ultrasound to perform short circuit detection on all PCBA multilayer boards in m in turn to obtain i sets of data sets;
[0074] Generally speaking, PCBA substrates are classified into five types: rigid substrates, flexible substrates, rigid-flexible substrates, metal substrates and ceramic substrates.
[0075] S3: Preprocess the short circuit detection results, compare the processed data with the actual short circuit defect, and find the maximum substrate thickness when the judgment accuracy is 1 as the prediction threshold;
[0076] S4: input the prediction threshold into the machine learning system, take the sample set n to be tested and put it into the machine learning system, and screen out the test sample set through the machine learning system;
[0077] S5: Use ultrasonic waves to perform short circuit detection on the test sample set, compare the test results with the actual defect conditions of the test samples, calculate the test accuracy, and confirm the transition threshold through the test accuracy;
[0078] S6: Replace the prediction threshold with the transition threshold and input it into the machine learning system, take the sample set q to be verified and put it into the machine learning system, and screen out the verification sample set through the machine learning system;
[0079] S7: Use ultrasound to perform short circuit detection on the verification sample set, compare the verification test results with the actual defect conditions of the verification samples, calculate the verification accuracy, and confirm the final threshold value through the verification accuracy.
[0080] The S1 specifically includes:
[0081] Take U PCBA multilayer boards with short circuit defects as the sample set, and divide the sample set into training sample set m, test sample set n and verification sample set q in a ratio of 3:3:4 by random allocation.
[0082] The S3 specifically includes:
[0083] Preprocess the data in the i-group data set, compare the processed data with the actual short-circuit defect, and establish i N-row and 2-column arrays respectively. N is a non-fixed value, and its value is the same as the number of subsets in the data set. The first column is the substrate thickness, and the second column is the judgment accuracy. Use the maximum value search algorithm to find the maximum substrate thickness when the accuracy is 1 , , , , , the maximum substrate thickness , , , , as a prediction threshold;
[0084] The preprocessing is a sum normalization process, and the formula is:
[0085]
[0086] Where n is the total number of data in the data set, and j is the jth data in the data set;
[0087] The judgment accuracy formula is:
[0088]
[0089] in To determine the accuracy, To determine the correct number, is the total number of short-circuit defects;
[0090] The maximum value finding algorithm includes:
[0091] 1) Traverse the second column of i N-row, 2-column arrays and find the number of rows with a value of 1;
[0092] 2) Compare the values in the first column of the rows with a value of 1 and find the maximum value among i arrays with N rows and 2 columns;
[0093] 3) The maximum value among i N-row and 2-column arrays is , , , , as output.
[0094] The S4 specifically includes:
[0095] Input i prediction thresholds into the machine learning system, take the set of samples to be tested n and put them into the machine learning system. The machine learning system first determines the type of PCBA multilayer board, and then retains the samples to be tested that are less than or equal to i prediction thresholds according to the type of PCBA multilayer board, and classifies them into test sample sets according to the type of PCBA multilayer board , test sample set , test sample set , , test sample set , according to the type of PCBA multilayer board, the samples to be tested that are greater than i prediction thresholds are eliminated.
[0096] The S5 specifically includes:
[0097] The test sample set described in S4 , test sample set , test sample set , , test sample set Use ultrasonic waves to perform short circuit detection on all PCBA multilayer boards, compare the test results of group i with the actual defect conditions of group i test samples, calculate the test accuracy, and determine whether the test accuracy of group i reaches the expected value of the test;
[0098] S5.1: A set of test samples in group i where the test accuracy reaches the test expected value, confirming that the corresponding prediction threshold is a transition threshold;
[0099] S5.2: For the test sample set in group i where the test accuracy does not reach the test expected value, its corresponding prediction threshold needs to be corrected to obtain the transition threshold;
[0100] The expected value of the test is generally 99.7%;
[0101] The test accuracy formula is:
[0102]
[0103] in To test accuracy, To determine the number of test samples with a precision of 1, is the total number of subsets in the test sample set.
[0104] The S6 specifically includes:
[0105] Input i transition thresholds into the machine learning system and replace the original i prediction thresholds. Take the sample set q to be verified and put it into the machine learning system. The machine learning system first determines the type of PCBA multilayer board, and then retains the samples to be tested that are less than or equal to i determination thresholds according to the type of PCBA multilayer board, and classifies them into verification sample sets according to the type of PCBA multilayer board. , validation sample set , validation sample set , , validation sample set , according to the type of PCBA multilayer board, the samples to be verified that are greater than i transition thresholds are eliminated.
[0106] The S7 specifically includes:
[0107] S7: Collect the validation samples described in S6 , validation sample set , validation sample set , , validation sample set Use ultrasonic waves to perform short circuit detection on all PCBA multilayer boards, compare the verification test results of group i with the actual defect conditions of group i test samples, calculate the verification accuracy, and determine whether the verification accuracy of group i reaches the verification expectation;
[0108] S7.1: The validation sample set in group i whose validation accuracy reaches the validation expectation value is confirmed to have its transition threshold as the final threshold;
[0109] S7.2: For the validation sample set in group i, whose validation accuracy does not reach the validation expectation, consider the influence of temperature and humidity on the test results, and introduce temperature factor and humidity factor into the transition threshold as its final threshold, so that the validation accuracy of the final threshold reaches the validation expectation;
[0110] The verification expectation value is generally 99.7%;
[0111] The verification accuracy formula is:
[0112]
[0113] in To verify the accuracy, is the number of validation samples for determining the accuracy of 1. is the total number of subsets in the validation sample set.
[0114] The specific process of the correction process in S5.2 includes:
[0115] by The prediction threshold is incremented, and the test sample set is short-circuited using ultrasound. The test results are compared with the actual defect conditions of the test samples, and the test accuracy is calculated to determine whether the detection accuracy of group i reaches the test expectation. If the detection accuracy of group i does not reach the test expectation, continue with The prediction threshold is incremented. When the detection accuracy of group i reaches the expected value of the test, the prediction threshold after this increment is used as the transition threshold. The increment formula is:
[0116]
[0117] in is the prediction threshold for the dth increment operation, is the prediction threshold without incrementing, is the standard deviation of the test sample set, Incremental times.
[0118] The specific process of introducing the temperature factor and the humidity factor into the transition threshold as the final threshold in S7.2 includes:
[0119] Establish a polynomial model. The polynomial model formula is as follows:
[0120]
[0121] in, is the final threshold, is the temperature factor, is the humidity factor, is the first fitting parameter, is the second fitting parameter, is the third fitting parameter, is the fourth fitting parameter, is the fifth fitting parameter, is the transition threshold;
[0122] Collect validation samples to verify the accuracy of the machine learning system under different temperature and humidity conditions , the verification accuracy in the verification sample set , the temperature and humidity are recorded one by one, and the first fitting parameter to the fifth fitting parameter are estimated by the least square method. After the estimation is completed, the OWL-QN algorithm is introduced;
[0123] The introduction of the OWL-QN algorithm includes the following steps:
[0124] (1 Initialization: Set the initial point, initial positive definite matrix, allowable error and maximum number of iterations as initialization parameters;
[0125] (2 Calculate pseudo gradient: Calculate pseudo gradient according to the current parameter value. The calculation method of pseudo gradient takes into account the characteristics of L1 regularization. When the parameter is 0, the pseudo gradient is also set to 0;
[0126] (3 Update parameters: Use the pseudo gradient of the L-BFGS algorithm to update the parameters, but at the same time use a mapping mechanism to ensure that the parameters before and after the update are in the same quadrant;
[0127] (4 Determine whether it converges: Determine whether the current parameters meet the convergence conditions. If the difference between the result of the previous iteration and that of the previous iteration is less than the allowable error, then stop the iteration; otherwise, proceed to the next step;
[0128] (5 Repeat iteration: Repeat steps (2 to (4) until the convergence condition is met or the maximum number of iterations is reached;
[0129] Then, the test sample set n and the verification sample set q were brought into different temperature and humidity conditions to verify the accuracy of the polynomial model by cross-validation method. The accuracy of the polynomial model was verified to reach 99.7%. The first fitting parameter to the fifth fitting parameter were used as the final parameters. is the final threshold. When the accuracy of the verification polynomial model is less than 99.7%, the first fitting parameters to the fifth fitting parameters are adjusted again by the least squares method according to the data under different temperature and humidity conditions of the sample set n to be tested and the sample set q to be verified, until the adjusted first fitting parameters to the fifth fitting parameters meet any data in the training sample set m, the sample set n to be tested and the sample set q to be verified.
[0130] In the process of estimating the first fitting parameter to the fifth fitting parameter by the least square method, ;
[0131] right The value of is judged, if , then this verification sample set is eliminated, and Z PCBA multilayer boards with short circuit defects are randomly selected as the verification sample set, and the above process is repeated until ;
[0132] like , then this time The final threshold value The composition value of .
[0133] Since temperature and humidity will affect the accuracy of ultrasonic testing, the thickness of the substrate needs to be reduced to ensure the accuracy of the ultrasonic testing results. The value of is standardized and eliminated The verification sample set is more reasonable and more in line with actual needs when temperature and humidity factors need to be added in the process of setting the substrate threshold.
[0134] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0135] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for setting a substrate thickness threshold for ultrasonic short circuit detection of a PCBA board, characterized in that: The following steps are involved: S1: Take U PCBA multilayer boards with short circuit defects as the sample set and divide the sample set into a training sample set m, a to-be-tested sample set n and a to-be-verified sample set q; S2: Take the training sample set m and classify it into type i substrate according to the substrate material , measure the thickness of the substrate, and use ultrasound to perform short circuit detection on all PCBA multilayer boards in m in turn to obtain i sets of data sets; S3: Preprocess the short circuit detection results, compare the processed data with the actual short circuit defect, and find the maximum substrate thickness when the judgment accuracy is 1 as the prediction threshold; S4: input the prediction threshold into the machine learning system, take the sample set n to be tested and put it into the machine learning system, and screen out the test sample set through the machine learning system; S5: Use ultrasonic waves to perform short circuit detection on the test sample set, compare the test results with the actual defect conditions of the test samples, calculate the test accuracy, and confirm the transition threshold through the test accuracy; S6: Replace the prediction threshold with the transition threshold and input it into the machine learning system, take the sample set q to be verified and put it into the machine learning system, and screen out the verification sample set through the machine learning system; S7: Use ultrasonic waves to perform short circuit detection on the verification sample set, compare the verification detection results with the actual defect conditions of the verification samples, calculate the verification accuracy, and confirm the final threshold value through the verification accuracy; The S3 specifically includes: Preprocess the data in the i-group data set, compare the processed data with the actual short-circuit defect, and establish i N-row and 2-column arrays respectively. N is a non-fixed value, and its value is the same as the number of subsets in the data set. The first column is the substrate thickness, and the second column is the judgment accuracy. Use the maximum value search algorithm to find the maximum substrate thickness when the accuracy is 1 , , , , , the maximum substrate thickness , , , , as a prediction threshold; The maximum value finding algorithm includes: 1) Traverse the second column of i N-row, 2-column arrays and find the number of rows with a value of 1; 2) Compare the values in the first column of the rows with a value of 1 and find the maximum value among i arrays with N rows and 2 columns; 3) The maximum value among i N-row and 2-column arrays is , , , , as output.
2. The method for setting a substrate thickness threshold for ultrasonic short circuit detection of a PCBA board according to claim 1, characterized in that: The S1 specifically includes: Take U PCBA multilayer boards with short circuit defects as the sample set, and divide the sample set into training sample set m, test sample set n and verification sample set q in a ratio of 3:3:4 by random allocation.
3. The method for setting a substrate thickness threshold for ultrasonic short circuit detection of a PCBA board according to claim 1, characterized in that: The S3 specifically includes: Preprocess the data in the i-group data set, compare the processed data with the actual short-circuit defect, and establish i N-row and 2-column arrays respectively. N is a non-fixed value, and its value is the same as the number of subsets in the data set. The first column is the substrate thickness, and the second column is the judgment accuracy. Use the maximum value search algorithm to find the maximum substrate thickness when the accuracy is 1 , , , , , the maximum substrate thickness , , , , as a prediction threshold; The preprocessing is a sum normalization process, and the formula is: Where n is the total number of data in the data set, and j is the jth data in the data set; The judgment accuracy formula is: in To determine the accuracy, To determine the correct number, is the total number of short-circuit defects; The maximum value finding algorithm includes: 1) Traverse the second column of i N-row, 2-column arrays and find the number of rows with a value of 1; 2) Compare the values in the first column of the rows with a value of 1 and find the maximum value among i arrays with N rows and 2 columns; 3) The maximum value among i N-row and 2-column arrays is , , , , as output.
4. The method for setting a substrate thickness threshold for ultrasonic short circuit detection of a PCBA board according to claim 3, characterized in that: The S4 specifically includes: Input i prediction thresholds into the machine learning system, take the set of samples to be tested n and put them into the machine learning system. The machine learning system first determines the type of PCBA multilayer board, and then retains the samples to be tested that are less than or equal to i prediction thresholds according to the type of PCBA multilayer board, and classifies them into test sample sets according to the type of PCBA multilayer board , test sample set , test sample set , , test sample set , according to the type of PCBA multilayer board, the samples to be tested that are greater than i prediction thresholds are eliminated.
5. The method for setting a substrate thickness threshold for ultrasonic short circuit detection of a PCBA board according to claim 1, characterized in that: The S5 specifically includes: The test sample set described in S4 , test sample set , test sample set , , test sample set Use ultrasonic waves to perform short circuit detection on all PCBA multilayer boards, compare the test results of group i with the actual defect conditions of group i test samples, calculate the test accuracy, and determine whether the test accuracy of group i reaches the expected value of the test; S5.1: A set of test samples in group i where the test accuracy reaches the test expected value, confirming that the corresponding prediction threshold is a transition threshold; S5.2: For the test sample set in group i where the test accuracy does not reach the expected value, the corresponding prediction threshold needs to be corrected to obtain the transition threshold; The test accuracy formula is: in To test accuracy, To determine the number of test samples with a precision of 1, is the total number of subsets in the test sample set.
6. The method for setting a substrate thickness threshold for ultrasonic short circuit detection of a PCBA board according to claim 1, characterized in that: The S6 specifically includes: Input i transition thresholds into the machine learning system and replace the original i prediction thresholds. Take the sample set q to be verified and put it into the machine learning system. The machine learning system first determines the type of PCBA multilayer board, and then retains the samples to be tested that are less than or equal to i determination thresholds according to the type of PCBA multilayer board, and classifies them into verification sample sets according to the type of PCBA multilayer board. , validation sample set , validation sample set , , validation sample set , according to the type of PCBA multilayer board, the samples to be verified that are greater than i transition thresholds are eliminated.
7. The method for setting a substrate thickness threshold for ultrasonic short circuit detection of a PCBA board according to claim 1, characterized in that: The S7 specifically includes: S7: Collect the validation samples described in S6 , validation sample set , validation sample set , , validation sample set Use ultrasonic waves to perform short circuit detection on all PCBA multilayer boards, compare the verification test results of group i with the actual defect conditions of group i test samples, calculate the verification accuracy, and determine whether the verification accuracy of group i reaches the verification expectation; S7.1: The validation sample set in group i whose validation accuracy reaches the validation expectation value is confirmed to have its transition threshold as the final threshold; S7.2: For the validation sample set in group i, whose validation accuracy does not reach the validation expectation, consider the influence of temperature and humidity on the test results, and introduce temperature factor and humidity factor into the transition threshold as its final threshold, so that the validation accuracy of the final threshold reaches the validation expectation; The verification accuracy formula is: in To verify the accuracy, is the number of validation samples for determining the accuracy of 1. is the total number of subsets in the validation sample set.
8. The method for setting a substrate thickness threshold for ultrasonic short circuit detection of a PCBA board according to claim 5, characterized in that: The specific process of the correction process in S5.2 includes: by The prediction threshold is incremented, and the test sample set is short-circuited using ultrasound. The test results are compared with the actual defect conditions of the test samples, and the test accuracy is calculated to determine whether the detection accuracy of group i reaches the test expectation. If the detection accuracy of group i does not reach the test expectation, continue with The prediction threshold is incremented. When the detection accuracy of group i reaches the expected value of the test, the prediction threshold after this increment is used as the transition threshold. The increment formula is: in is the prediction threshold for the dth increment operation, is the prediction threshold without incrementing, is the standard deviation of the test sample set, Incremental times.
9. The method for setting a substrate thickness threshold for ultrasonic short circuit detection of a PCBA board according to claim 7, characterized in that: The specific process of introducing the temperature factor and the humidity factor into the transition threshold as the final threshold in S7.2 includes: Establish a polynomial model. The polynomial model formula is as follows: in, is the final threshold, is the temperature factor, is the humidity factor, is the first fitting parameter, is the second fitting parameter, is the third fitting parameter, is the fourth fitting parameter, is the fifth fitting parameter, is the transition threshold; Collect validation samples to verify the accuracy of the machine learning system under different temperature and humidity conditions , the verification accuracy in the verification sample set , the temperature and humidity are recorded one by one, and the first fitting parameter to the fifth fitting parameter are estimated by the least square method. After the estimation is completed, the OWL-QN algorithm is introduced; Then, the test sample set n and the verification sample set q were brought into different temperature and humidity conditions to verify the accuracy of the polynomial model by cross-validation method. The accuracy of the polynomial model was verified to reach 99.7%. The first fitting parameter to the fifth fitting parameter were used as the final parameters. is the final threshold. When the accuracy of the verification polynomial model is less than 99.7%, the first fitting parameters to the fifth fitting parameters are adjusted again by the least squares method according to the data under different temperature and humidity conditions of the sample set n to be tested and the sample set q to be verified, until the adjusted first fitting parameters to the fifth fitting parameters meet any data in the training sample set m, the sample set n to be tested and the sample set q to be verified.
10. The method for setting a substrate thickness threshold for ultrasonic short circuit detection of a PCBA board according to claim 9, characterized in that: In the process of estimating the first fitting parameter to the fifth fitting parameter by the least square method, ; right The value of is judged, if , then this verification sample set is eliminated, and Z PCBA multilayer boards with short circuit defects are randomly selected as the verification sample set, and the above process is repeated until ; like , then this time The final threshold value The composition value of .
Citation Information
Patent Citations
Machine learning model training method for data sample imbalance problem
CN116011596A
Liquid crystal glass thickness online detection method, system, equipment and medium
CN118521222A