PCB production line fault processing method and system
By combining the IEEE 1588 protocol and Bayesian networks, high-precision causal reasoning for PCB circuit board production lines was achieved, solving the problem of inaccurate defect root cause localization in existing technologies and improving the automation level and diagnostic efficiency of the production line.
Patent Information
- Application Number
- CN202610341658.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-19
- Publication Date
- 2026-05-15
AI Technical Summary
Existing PCB production lines cannot accurately locate the root cause of defects in welding quality diagnosis. They rely on manual experience and have low diagnostic efficiency, and cannot achieve quantitative mapping and causal reasoning of process parameters throughout the entire process.
Sensor clock synchronization is achieved using the IEEE 1588 precise time protocol. Combined with a local buffering and retransmission mechanism, multi-process parameters are collected in real time and data quality labels are attached. Bayesian networks are used for causal inference to calculate the contribution of each process parameter to defects. Multi-dimensional verification is performed using the OPC UA protocol.
It achieves high-precision causal reasoning, improves the robustness and accuracy of fault root cause localization, supports production line self-healing and equipment hardware root cause tracing, and significantly improves the overall efficiency of the production line.
Smart Images

Figure CN122047759A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of computer technology, specifically relating to a method and system for handling faults in a PCB circuit board production line. Background Technology
[0002] As electronics manufacturing continues to evolve towards higher density and higher reliability, surface mount technology (SMT) production lines for printed circuit boards (PCBs) have become a core component of modern intelligent manufacturing. A typical SMT production line consists of solder paste printers, pick-and-place machines, reflow ovens, and automated optical inspection (AOI) equipment connected in series. These processes work together to complete the entire process from solder paste application and component placement to soldering. During this process, soldering quality is highly dependent on the precise control and dynamic matching of process parameters at each station. Even minor deviations in any step can lead to defects such as cold solder joints, misalignment, or bridging in the final product, directly impacting product yield and delivery time.
[0003] While AOI (Automated Optical Inspection) serves as a quality control unit at the end of the production line and can efficiently identify soldering defects, its diagnostic capabilities have long been limited to the "result presentation" level. Existing systems, after detecting a defect, typically only provide a rough indication that the anomaly occurred in a specific process step, failing to trace the specific process root cause. For example, the same type of cold solder joint may originate from insufficient solder paste thickness, deviations from the set reflow temperature profile, or oxidation of component leads—various upstream factors. Current technology lacks the ability to quantify and map the final defect characteristics to the entire process parameters and to perform causal reasoning. Even in production lines with parameter recording capabilities, a logical correlation model between parameter anomalies and defect types has not been established, making troubleshooting highly dependent on operator experience, time-consuming, and subjective.
[0004] Therefore, there is an urgent need for a fault handling method and system that can integrate data across the entire PCB production chain and accurately locate the root cause of defects based on causal logic, in order to break through the bottlenecks of existing technologies in terms of diagnostic accuracy, response speed and automation level, and comprehensively improve the overall efficiency (OEE) of the production line and intelligent manufacturing capabilities. Summary of the Invention
[0005] The purpose of this invention is to provide a PCB circuit board production line fault handling method and system, which can effectively solve the problems mentioned in the background art.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows: Firstly, a method for handling faults in a PCB circuit board production line includes: The system collects process parameters for multiple steps in the PCB manufacturing process in real time and adds a high-precision timestamp based on the IEEE 1588 precision time protocol to each process parameter. Based on the high-precision timestamp, the process parameters of different processes corresponding to the same PCB circuit board are time-aligned and encapsulated into a full-link process parameter record. A data quality tag is attached to each process parameter in the end-to-end process parameter record. The data quality tag is used to characterize the reliability of the parameter during the acquisition process. The entire process parameter records are used as evidence variables and input into a preset causal reasoning model. The causal reasoning model is used to describe the causal relationship between process parameters and welding defect types. Based on the evidence variables and the data quality labels, probabilistic reasoning is performed through the causal reasoning model to calculate the contribution of the process parameters of each upstream process to the current defect, wherein the data quality labels are used as weighting factors in the calculation of the contribution. Based on the stated contribution, the root cause parameters leading to the defect are determined.
[0007] Preferably, process parameters for multiple steps in the PCB manufacturing process are acquired in real time, and a high-precision timestamp based on the IEEE 1588 precision time protocol is added to each process parameter, including: Deploy sensor arrays at key process nodes of solder paste printers, pick and place machines, reflow ovens, and automated optical inspection equipment, and establish data links through network switches that support transparent clock functionality; The clock synchronization module ensures that the slave clocks of each sensor node are synchronized with the master clock of the central time server at the nanosecond level, ensuring that the error of the timestamps carried by each sensor data relative to the real time is less than 100 microseconds. A local cache queue is configured within the sensor data acquisition program. When a network connection interruption is detected, the acquired data is stored in the cache queue. After the communication link is restored, the data is retransmitted to the central process database in timestamp order, and a retransmission mark is added to the retransmitted data record.
[0008] Preferably, a data quality label is attached to each process parameter in the end-to-end process parameter record, including: The sensor health status is obtained, which is derived from the sensor's own self-test diagnosis results or the indirect judgment of the reasonableness of the sensor's output signal by the acquisition unit; The reliability of the acquisition timestamp is obtained, and the reliability of the acquisition timestamp is calculated based on the clock synchronization deviation synchronized by the IEEE1588 protocol; The data integrity is determined based on whether the end-to-end process parameter record is a real-time transmission or includes the retransmission marker. The sensor health status, the reliability of the acquisition timestamp, and the data integrity are used as the data quality labels.
[0009] Preferably, the causal reasoning model is a Bayesian network, and the method for constructing the Bayesian network includes: Define a set of nodes, which includes nodes corresponding to key process parameters of each process and nodes corresponding to defect types output by automated optical inspection equipment; By combining the physical mechanism of welding process and IPC industry standards, the causal edges between each process parameter node and defect type node are determined to form a network structure; Based on historical process parameter records, initialize the conditional probability table corresponding to each causal edge. The conditional probability table is used to quantify the degree of influence of the parent node state on the child node state. For parameter combinations with extremely low frequency in historical data, domain expert knowledge is introduced to correct null values or unreliable statistical values in the conditional probability table.
[0010] Preferably, based on the evidence variables and the data quality labels, probabilistic reasoning is performed using the causal reasoning model to calculate the contribution of each upstream process parameter to the current defect, including: The joint tree propagation algorithm is invoked to perform probabilistic inference and obtain the posterior probability that each process parameter node is in an abnormal state under the condition of known defect type. Statistically determine the prior anomaly probability of each process parameter during normal historical production processes; For each process parameter, the contribution of that parameter to the current defect is obtained by subtracting the prior anomaly probability from the posterior probability. In the probability calculation process of the joint tree propagation algorithm, for each input process parameter, a weight coefficient between 0 and 1 is generated based on its corresponding data quality label, and the original contribution value is multiplied by the weight coefficient to adjust the contribution weight of the parameter to the root cause judgment.
[0011] Preferably, after determining the root cause parameters leading to the defect based on the contribution, the method further includes: Based on the determined root cause parameters, query the programmable logic controller log of the corresponding production equipment to obtain the underlying control data, which includes at least one of control instructions, actuator feedback signals, equipment alarm logs, and operation records. The underlying control data and the process parameters are fused along a time axis to form a multidimensional verification dataset. Failure mode determination is performed based on the multidimensional validation dataset to verify the root cause parameters and generate validation conclusions. Based on the verification results, update the confidence level of the root cause parameter.
[0012] Preferably, the step of performing fault mode determination based on the multidimensional validation dataset to verify the root cause parameters and generate validation conclusions includes: If the control command is consistent with the set curve and the actuator feedback is normal, but the reading deviation of the two redundant sensors exceeds the preset threshold, a verification conclusion of sensor drift fault is generated, and the corresponding first verification gain term is determined. If the control command is determined to be abnormal and the actuator feedback is abnormal, and the sensor reading deviates from the set value by more than the preset range, a verification conclusion of actuator failure is generated, and the corresponding second verification gain item is determined. If the control command is consistent with the set curve and the actuator feedback is normal, but the sensor reading deviates from the process set value beyond the preset range, and the controller mode is in manual mode or there is a record of manual parameter modification, then a verification conclusion of control logic abnormality is generated, and the corresponding third verification gain item is determined. The process of updating the confidence level of the root cause parameter specifically involves adding the contribution of the root cause parameter to the corresponding validation gain term to obtain the updated confidence level.
[0013] Preferably, the method further includes: When the verification conclusion is inconsistent with the root cause based on Bayesian network reasoning, a secondary inference is triggered; A new node corresponding to the verification conclusion is added to the Bayesian network, and the verification conclusion is used as a new evidence variable input. The joint tree propagation algorithm is called again to calculate the posterior probability of all nodes, thereby achieving closed-loop correction.
[0014] Preferably, the method further includes: The entire process parameter record is structured and packaged according to the unique serial number of the PCB board, and then written into a distributed time-series database. The distributed time-series database uses a log structure merge tree as the underlying storage engine and employs a joint sharding strategy for data sharding. The sharding key of the joint sharding strategy is composed of the hash value of the board serial number, the time window to which the data belongs, and the production line number.
[0015] Secondly, a PCB circuit board production line fault handling system includes: Sensor arrays are deployed at key process nodes of solder paste printers, pick-and-place machines, reflow ovens, and automated optical inspection equipment to collect process parameters in real time. The clock synchronization module is used to add a high-precision timestamp to each acquired process parameter based on the IEEE 1588 precision time protocol. The central process database is used to store process parameters and, based on the high-precision timestamp, to align the process parameters of different processes corresponding to the same PCB circuit board in time sequence and encapsulate them into a full-link process parameter record. The data processing module is used to attach a data quality label to each process parameter in the end-to-end process parameter record. The data quality label is used to characterize the reliability of the parameter during the acquisition process. The root cause localization engine has a pre-stored causal reasoning model. The causal reasoning model is used to describe the causal relationship between process parameters and welding defect types. The root cause localization engine is used to input the full-link process parameter records as evidence variables and the data quality labels as weighting factors into the causal reasoning model for probabilistic reasoning, calculate the contribution of the process parameters of each upstream process to the current defect, and determine the root cause parameters that cause the defect based on the contribution.
[0016] In summary, this application includes at least one of the following beneficial technical effects: 1. This invention achieves nanosecond-level clock synchronization of sensors across processes by introducing the IEEE 1588 precision time protocol, and combines it with a local buffering and retransmission mechanism to control the time alignment accuracy of multi-source process data to within 1 millisecond. This fundamentally solves the problem of root cause misjudgment caused by data asynchrony and lays a reliable data foundation for subsequent high-precision causal inference.
[0017] 2. This invention innovatively introduces a three-dimensional data quality label, which includes sensor health status, timestamp reliability, and data integrity, as a weighting factor in the Bayesian network inference process. This can automatically identify and reduce the interference of abnormal or supplementary data on the diagnostic results, and significantly improve the robustness and accuracy of fault root cause localization.
[0018] 3. This invention deeply integrates PLC underlying control data (such as PWM duty cycle, PID output, heater current) through the OPC UA protocol for multi-dimensional verification, and automatically triggers secondary inference of the Bayesian network or issues closed-loop correction instructions through the OPC UA write service based on the verification conclusions, realizing in-depth tracing from abnormal process parameters to the root cause of equipment hardware and production line self-healing. Attached Figure Description
[0019] Fig. 1 This is a flowchart illustrating the PCB circuit board production line fault handling method proposed in this invention. Fig. 2 This is a flowchart illustrating the causal reasoning model based on the fusion of physical mechanisms and historical data in this invention. Fig. 3 This is a schematic diagram of the process parameters of the entire process that are collected and associated in real time in this invention; Fig. 4This is a flowchart illustrating the probabilistic tracing calculation and confidence verification of the root cause of defects in this invention. Detailed Implementation
[0020] To further illustrate the technical means and effects adopted by the present invention to achieve the intended purpose, the following detailed description of specific embodiments based on the present invention is provided in conjunction with the accompanying drawings and preferred embodiments.
[0021] See Figs. 1 to 4 As shown, a PCB circuit board production line fault handling method includes the following steps: Step S1: Collect and store the process parameters of the entire process in real time.
[0022] Step S101: Deploy high-precision sensor arrays at key process nodes of the solder paste printer, pick-and-place machine, reflow oven, and automated optical inspection (AOI) equipment. These sensors cover the entire physical process from solder paste application to final defect determination. For example, measure the solder paste thickness after the solder paste printing process, detect the placement pressure and position after the pick-and-place process, monitor the temperature curve in real time in each temperature zone of the reflow oven, and acquire soldering defect images at the automated optical inspection equipment.
[0023] All sensors establish low-latency communication links with the central process database via industrial Ethernet protocols such as EtherNet / IP or PROFINET. The physical medium of the links uses industrial-grade shielded twisted-pair cables or optical fibers to ensure electromagnetic compatibility.
[0024] The system uniformly sets the data transmission cycle to 50 milliseconds. At the same time, it uses the IEEE 1588 precision time protocol to achieve high-precision clock synchronization between sensor nodes and database servers. Combined with the isochronous synchronization communication function provided by industrial Ethernet, it can control the relative time deviation of different sensor data to the database to within 1 millisecond, thereby ensuring the precise alignment of multi-source process parameters in the time dimension.
[0025] Step S102: While deploying the sensor array, a clock synchronization module based on the IEEE 1588 precision time protocol is added. This module includes a central time server that serves as the master clock, and a slave clock unit built into each sensor node. The switches in the network support transparent clock functionality, which can automatically correct dwell time errors during data packet transmission.
[0026] In this way, nanosecond-level clock synchronization is achieved for all acquisition nodes, ensuring that the error between the timestamp carried by the sensor data in each process and the actual time is less than 100 microseconds.
[0027] Each sensor's data acquisition program is configured with a local cache queue. When a momentary interruption of the network connection is detected, the acquired data is first stored in the cache queue. After the communication link is restored, the data is automatically retransmitted to the central process database in ascending order of timestamp, thereby avoiding data loss.
[0028] When data is encapsulated as process records, synchronization status, such as whether the clock is locked and the retransmission flag, is appended as metadata fields to the header of each record to facilitate the identification of data credibility during subsequent data analysis.
[0029] Step S103: Key data such as solder paste thickness, thickness uniformity, and stencil alignment offset are acquired through the solder paste printing parameter acquisition subsystem. This subsystem consists of three modules working collaboratively: The solder paste thickness measurement module uses laser triangulation for non-contact measurement. The measuring head is mounted behind the printer and can move along the X and Y axes. Based on the PCB board dimensions, the system evenly distributes 32 sampling points across the board surface, for example, in an 8x4 grid. Each sampling point is measured five times, and the arithmetic mean is taken after removing gross errors as the measured solder paste thickness at that point. The average thickness of the solder paste is the average value of all sampling points, and the measurement accuracy can reach ±2 micrometers.
[0030] The thickness uniformity standard deviation calculation module calculates the uniformity of solder paste thickness based on the sample standard deviation formula in statistics, as follows: in, The standard deviation of thickness uniformity is expressed in micrometers; n is the number of sampling points, which is 32 in this embodiment. This is the measured value of the solder paste thickness at the i-th sampling point, in micrometers; This is the arithmetic mean of the solder paste thickness at all sampling points, in micrometers. The smaller the standard deviation, the more uniform the solder paste thickness distribution.
[0031] The stencil alignment offset measurement module consists of a high-resolution CMOS industrial camera and an image processing unit. Before the stencil contacts the PCB pads, the camera acquires images of the reference marks on the stencil and the corresponding reference marks on the PCB pads. Then, a template matching algorithm based on a normalized cross-correlation function is used to register the two images, calculating the offset of the stencil relative to the PCB in the X and Y directions, with a positioning accuracy better than ±5 micrometers. This offset is used to adjust the alignment mechanism of the printer, ensuring that solder paste is accurately printed onto the pads.
[0032] Step S104: The placement parameter acquisition subsystem acquires three key data points: the Z-axis downward pressure of the placement head, the component pickup vacuum, and the placement position offset.
[0033] The Z-axis pressure of the placement head (hereinafter referred to as placement pressure) is monitored using a piezoelectric force sensor. The piezoelectric force sensor is installed between the drive mechanism of the placement head and the nozzle, and can directly sense the pressure change at the moment of placement. The analog signal of the sensor is converted into a digital quantity by a 24-bit analog-to-digital converter, and the sampling frequency is set to no less than 1 kHz. This can completely capture the millisecond-level dynamic pressure fluctuations during the placement process, providing raw data for subsequent analysis of whether the placement pressure is abnormal.
[0034] The vacuum level of the component pickup is acquired using a digital pressure transmitter, which is connected to the vacuum circuit of the placement head and outputs the current vacuum level in real time. The system has a preset alarm threshold; when the vacuum level sample value falls below -80 kPa, it automatically triggers an early warning of pin oxidation or package damage, reminding the operator to check the status of the feeder and the component. The output signal of the digital pressure transmitter is directly uploaded via fieldbus, eliminating the need for additional signal conditioning circuitry.
[0035] The measurement of placement position offset relies on a vision positioning system. A high-resolution CMOS industrial camera is mounted on the pick-and-place machine. After the placement head picks up the component but before it is placed onto the PCB, the CMOS camera captures images of the reference marks on the PCB and the component itself. The system employs a template matching algorithm based on a normalized cross-correlation function to register the pre-stored standard component image with the real-time captured image. Through sub-pixel level interpolation processing, such as using bicubic interpolation or parabolic fitting, a positioning resolution of 0.1 pixels is achieved on a 2048x2048 pixel image, which translates to a physical size of approximately 1 micrometer. This offset is used for closed-loop control of the placement head's motion compensation, ensuring accurate component placement.
[0036] Step S105: Obtain the temperature and related process parameters of each temperature zone through the reflow soldering parameter acquisition subsystem.
[0037] The reflow oven is equipped with no fewer than eight independent heating zones. It contains a temperature control module, including a PID controller, for real-time acquisition and processing of temperature signals from each zone. This module receives signals from two sensing units and performs cross-validation. Each zone integrates dual redundant temperature sensing units. The first sensing unit uses a K-type thermocouple, whose measuring end directly contacts the PCB surface to measure the actual temperature of the board. The second sensing unit uses an infrared thermometer to non-contactly measure the radiant temperature of the solder joint area.
[0038] Two sensor signals are simultaneously input to the temperature control module, and the two readings are compared in real time. If the absolute value of the deviation exceeds 3 degrees Celsius for three consecutive times, the sensor is determined to be abnormal and a health status alarm is triggered, prompting maintenance personnel to check whether the sensor has drifted or become contaminated.
[0039] The sampling period for data acquisition is uniformly set to 100 milliseconds. The temperature curves recorded for each temperature zone are used to extract four core indicators, specifically: The first item is the peak temperature, which refers to the highest temperature value reached in this temperature zone within a welding cycle.
[0040] The second term is the temperature rise slope, which is defined as the average rate of temperature increase from room temperature to 150 degrees Celsius. The specific calculation formula is that the temperature rise slope equals the difference between 150 and room temperature divided by the time taken to rise from room temperature to 150 degrees Celsius, with the unit being degrees Celsius per second.
[0041] The third item is the heat preservation time, which refers to the total duration for which the temperature is maintained within the process window of 217 to 225 degrees Celsius. It is obtained by statistically analyzing the cumulative duration of sampling points falling within this range.
[0042] The fourth item is the cooling rate, which is defined as the average rate of cooling down from the peak temperature to 217 degrees Celsius. The formula is that the cooling rate is equal to the difference between the peak temperature and 217, divided by the time it takes for the temperature to drop from the peak temperature to 217 degrees Celsius, and the unit is degrees Celsius per second.
[0043] The extraction of all indicators is completed automatically after each welding cycle.
[0044] Step S106: All process parameters collected in the previous steps are structured and packaged according to the unique serial number of the PCB board to form a full-link process parameter vector. The data structure of this vector is defined in a sequential field manner to facilitate subsequent storage and retrieval.
[0045] Field 1 is the board serial number, a string of fixed length 16 bytes, used to uniquely identify each PCB board; Field 2 is the average solder paste thickness, a floating-point number in micrometers, calculated from the solder paste thickness measurement module; Field 3 is the standard deviation of thickness uniformity, a floating-point number in micrometers, also from solder paste parameter acquisition; Fields 4 and 5 are the stencil offset in the X and Y directions, respectively, each a double-precision floating-point number in micrometers, stored sequentially; Field 6 is the Z-axis downward pressure of the component placement, a floating-point number in Newtons, from component placement parameter acquisition; Field 7 is the component pickup vacuum level, a floating-point number in kilopascals. Field 8 is the placement position offset, a floating-point number in micrometers; Fields 9 to 40 store the four core indicators of the eight reflow soldering temperature zones in sequence: peak temperature, heating slope, holding time, and cooling rate of the first temperature zone, followed by these four indicators for the second temperature zone, and so on until the eighth temperature zone, occupying a total of 32 floating-point fields; Field 41 is the detection result code output by the automatic optical inspection equipment, an integer data, where 0 represents no defects, 1 represents cold solder joints, 2 represents component misalignment, and other values can be expanded to define more defect types.
[0046] After the structured encapsulation is completed, the entire process parameter vector is asynchronously written to the central process database through a message queue middleware such as Apache Kafka. The introduction of the message queue can buffer the instantaneous high-concurrency write pressure, avoid database write bottlenecks, and ensure reliable data transmission. The write process adopts a batch submission method, and sends the vectors in a unified manner after accumulating a certain number of vectors or after a fixed time interval, so as to improve the write efficiency.
[0047] This end-to-end process parameter vector is the process parameter record described later. Each vector corresponds to a complete process record for a PCB board.
[0048] In step S107, while generating a full-link process parameter vector, i.e., a process parameter record, for each PCB board, a set of data quality labels needs to be attached to each record. This set of labels is used to identify the reliability of the sensor data corresponding to the record during the acquisition process. In the Bayesian network inference process constructed later, these labels will be used as weight factors in the calculation. When the quality label of a certain parameter indicates that the data is abnormal, the contribution weight of that parameter to the root cause judgment will be automatically reduced, thereby avoiding diagnostic bias caused by instantaneous sensor abnormalities or communication failures.
[0049] Data quality labels specifically include information in three dimensions. These are as follows: The first dimension is the sensor's health status, which comes directly from the sensor's self-test diagnostic results. For smart sensors equipped with self-testing capabilities, the three states—self-test passed, warning, or failure—can be obtained by reading their status register or diagnostic messages. For ordinary sensors without self-testing capabilities, the status is indirectly determined by the acquisition unit periodically sending test commands or monitoring the reasonableness of the sensor's output signals. For example, if a sensor repeatedly outputs values exceeding its measurement range, its status is marked as failure. The sensor health status field is stored using an enumeration type, with values of normal, warning, or failure.
[0050] The second dimension is the reliability of the acquired timestamp, which is calculated based on the IEEE 1588 clock synchronization deviation implemented in step S102. Specifically, during each sensor data acquisition, the synchronization deviation of the sensor's slave clock relative to the master clock is recorded in microseconds. This deviation value is compared with a preset deviation threshold. If the deviation is less than 50 microseconds, the timestamp reliability is marked as high; if the deviation is between 50 and 200 microseconds, it is marked as medium; and if the deviation exceeds 200 microseconds, it is marked as low. Continuous numerical values can also be used to represent reliability; for example, the reliability value can be defined as max0,1 minus the deviation divided by 200. This reliability field is stored in the process record during packaging.
[0051] The third dimension is data integrity, which indicates whether there is any data loss or need for retransmission in the process record. As explained in step S102, each sensor is configured with a local cache queue. During network interruptions, data is temporarily stored locally and retransmitted in timestamp order after recovery. When a record is written to the database via a retransmission mechanism, a retransmission marker is appended to the record header. The data integrity field is set based on this retransmission marker. If it is real-time transmission, it is marked as complete; if it is retransmission, it is marked as retransmission; if packet loss is detected and cannot be retransmitted, it is marked as missing.
[0052] In the subsequent Bayesian network inference process, the quality labels of the above three dimensions jointly determine the weight of the parameter in the contribution calculation. The specific implementation is as follows: for each input process parameter, a weight coefficient w between 0 and 1 is generated based on its quality label, and then the original contribution value is multiplied by the weight coefficient when the process parameter participates in the contribution calculation.
[0053] The generation rules for the weight coefficient can be predefined as follows: if the sensor health status is failure or the data integrity is missing, the weight coefficient is set to 0, that is, the parameter is completely ignored; if the sensor health status is warning or the timestamp reliability is low, the weight coefficient is set to 0.5; if there is a retransmission mark and other tags are normal, the weight coefficient is set to 0.8; and the weight coefficient for other normal situations is 1.0.
[0054] The weighted contribution values are used for subsequent root cause ranking.
[0055] In step S108, to support subsequent rapid retrieval and time-series consistency assurance, the central process database needs to establish a reasonable index structure and incorporate a data consistency verification module. The index structure adopts a multi-level combination design. The first-level index is built based on the hash value of the board serial number and is used to accurately match the full-link data of a single PCB board. The second-level index is based on the time window and divided by minute granularity, supporting range queries by time period. The third-level index is based on the process equipment ID, which facilitates statistical analysis by equipment dimension. These three levels of indexes work together to efficiently respond to different query needs.
[0056] The central process database runs a data consistency verification module, which is triggered at a preset time period, such as once per hour, to perform a time sequence logic check on the most recently entered process records.
[0057] The basic verification method is as follows: First, group all records according to the board serial number. Then, sort the records in each group according to the process sequence, namely solder paste printing, surface mount, reflow soldering, and automatic optical inspection. Then, check whether the timestamp of each record strictly increases. If it is found that the reflow soldering timestamp of a certain PCB board is earlier than the surface mount timestamp, or the solder paste printing timestamp is later than the surface mount timestamp, etc., which violate the process sequence, it is determined that there is a timing logic contradiction, and an alarm is triggered immediately.
[0058] When a timing discrepancy is detected, an attempt is made to automatically correct it using redundant timestamp information. The redundant timestamp information mainly includes two aspects: first, the clock synchronization deviation and synchronization status of each sensor data recorded in step S102; and second, the device internal event time recorded in the device PLC log.
[0059] The specific method for correction is as follows: First, compare the timestamp reliability labels of the two records corresponding to the contradictory process, and select the timestamp of the record with higher reliability as the benchmark. For example, if the reliability of the timestamp of the placement record is high and the reliability of the reflow soldering record is low, then take the placement timestamp as the benchmark and adjust the reflow soldering timestamp to a reasonable value after the placement timestamp, such as the placement timestamp plus the average time of the process.
[0060] If the two records have the same level of reliability, then further query the event time of the device in the PLC log, such as the start time of the heating cycle of the reflow oven, and replace the original timestamp with this event time; if reliable redundant information cannot be obtained, then only an alarm is recorded and the contradictory record is marked as pending manual verification, without automatic correction.
[0061] Step S109: To achieve high-throughput writing and low-latency querying, the central process database adopts a distributed time-series database architecture, specifically an InfluxDB cluster or a time-series database product with equivalent functionality.
[0062] The entire database system adopts a hybrid topology deployment mode. Local nodes are deployed on the edge server of the production line to receive and write all process data reported by the sensors in real time. The local nodes need to have the ability to write more than 5,000 records per second. At the same time, remote nodes are deployed in the cloud data center for long-term archiving of historical data. The data retention period is set to no less than 5 years to meet the needs of subsequent quality traceability and model training.
[0063] To ensure the ability to quickly retrieve end-to-end process parameters for any PCB board, the central process database needs to establish an efficient index structure for the board serial number. In practice, the label indexing mechanism built into the time-series database is used, with the board serial number as a mandatory label, and the central process database will automatically create an inverted index for it.
[0064] Meanwhile, in order to optimize query performance within a time range, the underlying storage engine of the central process database adopts a log structure merge tree, or LSM tree structure. This structure can convert random writes into sequential writes, greatly improving write throughput and supporting fast data filtering by time dimension.
[0065] Based on the above index and storage structure, the system can guarantee that for any given PCB board serial number, the corresponding end-to-end process parameters can be returned within 200 milliseconds.
[0066] Data sharding strategy is key to avoiding write bottlenecks. This solution adopts a combined sharding approach, where the sharding key is composed of three parts: the hash value of the board serial number modulo, the time window to which the data belongs, and the production line number.
[0067] The specific approach is to divide each hour into a time window, and use the hash value of the board serial number and the production line number as the partition key. For example, the partition key is equal to the number of partitions modulo the hash board serial number plus the production line number plus the start timestamp of the time window. In this way, data from the same production line within the same hour will be written to the same partition, while data from different production lines or different hours will be distributed to different partitions, which ensures both locality and distributes the write pressure.
[0068] The database cluster automatically distributes data across multiple physical nodes based on the sharding key, achieving horizontal scaling.
[0069] Step S2: Construct a causal reasoning model based on the fusion of physical mechanisms and historical data. This model uses a Bayesian network as its core framework to quantify the causal relationship between key process parameters of each process on the production line and the final welding defect type, providing a probabilistic reasoning basis for subsequent root cause tracing.
[0070] Step S201 requires first defining the set of nodes in the Bayesian network. These nodes cover all key process parameters that may affect the final welding quality, as well as the defect types output by the automated optical inspection equipment.
[0071] The nodes defined in this embodiment include: solder paste printing thickness H, thickness uniformity U, stencil offset A, Z-axis downward pressure of the placement head P, component pickup vacuum V, placement position offset L, temperatures of the eight reflow soldering zones T1 to T8, heating slope R, holding time D, cooling rate C, and final defect type F. H, U, A, P, V, L, T1 to T8, R, D, and C are all measured parameters from upstream processes, and F is the defect code output by the automated optical inspection equipment. Each node corresponds to a random variable, whose value can be continuous or discrete.
[0072] Step S202 involves determining the causal edges between nodes, i.e., which process parameters directly affect the final defect type and whether there are mutual influences between process parameters. This requires a systematic approach that combines the physical mechanisms of welding processes with domain expert knowledge.
[0073] The specific approach is as follows: First, for each possible defect type, such as cold solder joints or component misalignment, process experts and field engineers conduct Failure Mode and Effects Analysis (FMEA) to list the upstream process parameters that may lead to the defect. Then, referring to the descriptions of the relationship between soldering quality and process parameters in IPC industry standards, such as the acceptable and unacceptable soldering conditions specified in IPC-A-610, these empirical causal relationships are transformed into directed edges in a Bayesian network. For example, insufficient solder paste thickness directly leads to cold solder joints, so a directed edge from node H to F is necessary; the fifth temperature zone, as the reflow peak zone, has a temperature T5 that plays a decisive role in solder melting, so the edge points from T5 to F; abnormal placement pressure may cause component misalignment or poor soldering, so the edge points from P to F.
[0074] In addition, there may be causal relationships between certain process parameters. For example, the stencil offset A can affect the uniformity of solder paste printing thickness H. Therefore, it is also possible to point from A to H. However, in this embodiment, in order to simplify the model, only direct edges from each process parameter node to defect type F are established. The set of these edges constitutes the basic skeleton of the Bayesian network.
[0075] All edge settings must be reviewed by experts to ensure they conform to real physical processes.
[0076] Step S203: After completing the network structure definition, it is necessary to initialize the conditional probability table corresponding to each causal edge. The conditional probability table quantifies the degree of influence of the parent node state on the child node state.
[0077] First, a sufficient number of samples are extracted from the historical data stored in the central process database. In this embodiment, 100,000 PCB boards that have undergone automatic optical inspection and have been labeled with defect types are selected. These samples contain complete measured values of process parameters and corresponding defect codes.
[0078] For each continuous process parameter node, such as solder paste thickness H, its continuous values need to be divided into several discrete state intervals in order to perform probability statistics.
[0079] The basis for dividing the range mainly comes from two aspects: First, the parameter tolerance range clearly given in the process specification. For example, the solder paste thickness process specification requires 90 micrometers to 110 micrometers. Therefore, H can be divided into a low range below 90 micrometers, a normal range of 90 to 110 micrometers, and a high range above 110 micrometers. Second, for parameters without clear specification boundaries, the percentiles of historical data can be used for division. For example, the temperature rise slope R can be divided into three ranges: low, normal, and high, according to its 5th percentile and 95th percentile.
[0080] The defect type F itself is a discrete variable. We can directly use its encoded value: 0 to indicate no defect, 1 to indicate a poor weld, 2 to indicate an offset, etc.
[0081] Step S204: After completing the data discretization, the maximum likelihood estimation method is used to calculate the values in each conditional probability table. The specific calculation method is to count the frequency of each defect type taken by the child node F when each parent node is in a certain specific state.
[0082] Taking solder paste thickness H as an example, from 100,000 historical samples, all samples where H is in the low range are selected. Assuming there are 2000 samples, of which 800 are determined by automatic optical inspection to be cold solder joints (F = 1). Then the conditional probability P (F = 1 given H is in the low range) is equal to 800 divided by 2000, which equals 0.4. Similarly, the conditional probability of F equaling other defect types when H is in the low range, and the conditional probability of F when H is in the normal range and the high range, can be calculated.
[0083] For other process parameter nodes, the corresponding conditional probabilities are calculated in the same way. If a process parameter node has multiple parent nodes, for example in a more complex network structure, it is necessary to calculate the conditional probabilities under the combination of multiple parent node states. However, in this embodiment, each parameter node directly points to F, so the conditional probability table of each parameter node only depends on the state of the node itself.
[0084] In step S205, in actual production data, the frequency of certain combinations of process parameters may be extremely low or even zero, resulting in null values or unreliable statistics in the conditional probability table. For such extremely sparse scenarios, it is necessary to introduce domain expert knowledge for correction.
[0085] Experts can refer to the failure physical relationships specified in the IPC-A-610 standard, or rely on years of field experience to assign a theoretical basic probability value to parameter combinations that have never appeared in historical data. For example, the combined situation where solder paste thickness H is in the low range and thickness uniformity U is also in the abnormal range may be extremely rare, but physically this combination will inevitably lead to a high probability of cold solder joints. Experts can set a conservative initial probability, such as 0.9, as the conditional probability value under this combination to avoid the model being unable to make reasonable inferences when encountering this situation in reality due to missing data.
[0086] These correction values will be gradually adjusted as real data accumulates during subsequent online learning.
[0087] Step S206: In order to keep the model adaptable to changes in production conditions, the system deploys an online learning mechanism to continuously optimize the Bayesian network parameters, i.e., the conditional probability table.
[0088] Each time a root cause diagnosis process is completed and the generated diagnosis report is confirmed by maintenance personnel, the system adds the complete process parameter vector corresponding to the sample and the finally confirmed root cause of the defect as new training data to the historical database. Then, the background thread asynchronously starts the expectation-maximization algorithm (EM) to update the relevant conditional probability table using the newly added sample.
[0089] The EM algorithm is executed in two iterative steps: the expectation step and the maximization step. In the expectation step, the posterior probability of each unobserved variable is calculated based on the current model parameters. In the maximization step, the model parameters are re-estimated using these posterior probabilities to maximize the likelihood function.
[0090] Repeat these two steps until convergence. In this embodiment, the convergence condition is set as the change in any conditional probability table entry being less than 0.001 in 100 consecutive iterations.
[0091] The update process is executed in a background thread, which does not consume CPU resources for real-time inference, ensuring that online diagnostics are not affected.
[0092] Step S207: Store the trained Bayesian network in an in-memory database in the form of a graph structure, such as using an in-memory database that supports graph data, like RedisGraph.
[0093] Each node is stored as an entity in the database. The entity attributes include the historical mean, variance, and confidence interval of the parameter. These statistics can be used as prior information for subsequent inference. Each directed edge is also stored as a relation, and the relation attributes store the corresponding conditional probability weights.
[0094] Loading the network into memory can significantly improve access speed during real-time inference, meeting the stringent response time requirements of production sites. When the model parameters are updated through online learning, the graph structure in the in-memory database is also updated synchronously, ensuring that the inference always uses the latest model.
[0095] Step S3: Perform probabilistic tracing calculation of defect root cause and deploy the root cause localization engine. This engine continuously monitors the output of the automatic optical inspection equipment and immediately starts the subsequent tracing process when it detects that the defect code is not 0.
[0096] In step S301, after the automatic optical inspection equipment completes the inspection of a PCB board, it will output a defect code F. This defect code is represented by an integer value, where 0 represents no defect, 1 represents a cold solder joint, 2 represents a component offset, and the remaining values can be extended to define more defect types according to actual needs.
[0097] The root cause localization engine continuously monitors the defect codes output by the automated optical inspection equipment. Once it detects that F is not equal to 0, it immediately triggers a tracing task for the defect and starts the subsequent root cause analysis process.
[0098] In step S302, the root cause localization engine uses the unique serial number of the defective PCB board as the query key to initiate a retrieval request to the central process database. The central process database utilizes the previously established multi-level index structure to quickly locate and return the full-link process parameter vector corresponding to the PCB board based on the serial number.
[0099] The end-to-end process parameter vector contains all measured parameters for each step from solder paste printing to reflow soldering, such as measured values for solder paste thickness H, fifth temperature zone T5, and placement pressure P. These parameters will serve as evidence for subsequent reasoning.
[0100] Step S303 involves inputting the retrieved end-to-end process parameter vector as evidence variables into the constructed Bayesian network model. Each measured parameter in the end-to-end process parameter vector corresponds to a node in the Bayesian network, and the specific value of the parameter is used to set the observation state of that node, thereby integrating real-time production information into the causal reasoning framework. For example, if the measured value of the solder paste thickness H is 85 micrometers, then that node is set to a low state, and the system will perform probability calculations based on this observation.
[0101] Step S304: Call the joint tree propagation algorithm to perform probabilistic inference. The joint tree algorithm is an exact inference algorithm suitable for medium-sized Bayesian networks. The first step of the algorithm is to convert the Bayesian network into a joint tree structure. The conversion process includes steps such as moralization, triangulation, and clique node identification.
[0102] Moralization refers to adding undirected edges between all parent nodes in the network that share a common child node, making the network an undirected graph; triangulation refers to adding edges to the moral graph to eliminate all cycles with a length greater than 3, resulting in a chord graph; then, all maximal complete subgraphs in the chord graph are identified as clique nodes, and clique nodes are connected through separator nodes to form a joint tree.
[0103] After the joint tree is constructed, probability calculation is performed through a message passing mechanism. The message propagates bidirectionally along the joint tree. Each clique node collects information from its neighboring nodes and updates its own potential function. After multiple iterations, the potential functions of all clique nodes reach a steady state. At this point, the posterior probability distribution of each non-evidence node, i.e., the upstream process parameter node, can be calculated.
[0104] The joint tree algorithm can efficiently process Bayesian network inference with evidence and obtain the posterior probability of each parameter node.
[0105] Step S305: For each upstream process parameter node X, calculate its contribution to the current defect type F. The contribution is defined as the posterior probability of parameter X being in an abnormal state under known defect type conditions minus the prior abnormal probability of parameter X in normal production. The calculation formula is as follows: in, This indicates that the value of parameter X exceeds the normal range allowed by the process specification. For example, if the solder paste thickness H is less than 90 micrometers or greater than 110 micrometers, it is considered abnormal. Encode the type of defect observed by the automated optical inspection equipment, i.e., the defect value currently being traced; It is the posterior probability of parameter X being abnormal under the condition that the current defect type is known. This value is directly output by the joint tree algorithm in step S304. It is the prior anomaly probability of parameter X in the historical normal production process. It is obtained by statistically analyzing the frequency of this parameter exceeding the standard range in the historical data of the past three months. This prior probability is pre-stored in the node attributes of the Bayesian network.
[0106] The larger the contribution value, the stronger the correlation between the parameter anomaly and the current defect.
[0107] In step S306, in order to meet the real-time requirements of the high-speed production line, a single inference task is encapsulated into an independent thread and assigned to the GPU acceleration unit for execution.
[0108] In practice, the system uses parallel computing frameworks such as CUDA or OpenCL to package and transfer data from multiple inference tasks to the GPU memory. The large number of computing cores on the GPU execute matrix operations and probability updates in the joint tree algorithm in parallel. The parallel computing capability of the GPU enables the system to process defect tracing requests from up to 20 PCBs at the same time.
[0109] Step S307: After the inference calculation is completed, the results are temporarily stored in memory in structured JSON format. Each result record contains the following fields: the parameter name of the root cause node, the contribution value, the posterior probability value, and the confidence interval. The confidence interval is used to characterize the reliability of the root cause judgment, and its calculation is based on the variance of the posterior probability distribution.
[0110] For each parameter node, its posterior probability distribution gives the probability of the node being in each possible state. For example, for discrete states, the variance of the distribution can be calculated as a measure of uncertainty. Then, based on a preset confidence level, such as 95%, the upper and lower limits of the confidence interval can be determined by using a normal approximation or by directly using the quantiles of the posterior distribution.
[0111] These temporarily stored results will serve as the raw data for generating subsequent diagnostic reports.
[0112] Step S4: Generate a root cause diagnosis report with confidence verification.
[0113] Step S401: Read the contribution values of all upstream process parameter nodes from the inference results temporarily stored in step S307. The contribution values are sorted in descending order to form a sorted list. The system selects the top N parameters with the highest contribution as potential root causes from the list according to preset rules. The value of N is set to 2 to 5, and the default value of N is 3. That is, the top three parameters with the highest contribution are output as the most likely root causes. The sorting and selection operations are completed directly in memory without additional database queries, ensuring processing efficiency.
[0114] Step S402: For each potential root cause identified, the programmable logic controller (PLC) log of the corresponding production equipment needs to be queried synchronously to obtain the internal operating data of the equipment for subsequent root cause verification. The specific implementation method for querying the PLC log is as follows: First, maintain a mapping table between devices and PLCs. This table records the IP address or hostname of the PLC corresponding to each production device, such as a solder paste printer, pick-and-place machine, reflow oven, or automatic optical inspection equipment, the endpoint URL of the OPC unified architecture server, and access authentication information. When a potential root cause is identified, such as an abnormal temperature in the fifth temperature zone of the reflow oven, the system retrieves the corresponding PLC connection parameters from the mapping table based on the device name.
[0115] Then, a secure session is established with the target PLC via the OPC Unified Architecture Protocol. OPC UA is a standard communication protocol in the field of industrial automation that supports cross-platform data exchange. The system uses the OPC UA client library. First, it initiates a connection request based on the endpoint URL, performs a handshake and authentication, and establishes a session. After successfully establishing the session, the client can browse the PLC's address space and locate all data nodes related to the root cause parameters. For example, for an abnormal temperature in the fifth temperature zone of the reflow oven, the data nodes that need to be located include: the duty cycle of the PWM signal driving the heater, the temperature reading of the K-type thermocouple, the temperature reading of the infrared thermometer, the output value of the PID controller in the temperature control module, and related control loop setpoints SP, process values PV, output values OP, controller modes, etc.
[0116] Historical data within a specified time range is retrieved via the OPC UA historical read service. This service requires a start and end timestamp, and the time range is set to 30 minutes prior to the defect occurrence (i.e., from the defect occurrence time minus 30 minutes to the defect occurrence time). The OPC UA server returns a sequence of sampled values for each data node within that time range, with each sampled value including a timestamp and a numerical value. The system can configure an upper limit on the number of sampled points read or employ time aggregation, such as one point every 100 milliseconds, to match the sampling frequency of the sensor data.
[0117] In addition to control commands and feedback signals, the system also reads device alarm logs and operation records for the specified time period via OPC UA. Alarm logs are typically stored in the PLC's alarm condition object, while operation records may originate from PLC program events or the operation history of the HMI. This data is also obtained through the OPC UA historical event reading service, and the returned event records include information such as event time, event type, and event description.
[0118] All data acquired from the PLC is aligned with the original sensor process data according to the timestamp.
[0119] Step S403: After acquiring the PLC log data, all data needs to be fused with the sensor process data according to the time axis to form a multidimensional verification dataset. The key to fusion is time axis alignment. Since the sensor data and PLC log data may have different sampling periods and timestamp accuracies, the system uses the following method for fusion: First, the time when the defect occurs is set as the reference time zero point. The timestamp of the sensor process data is converted into an offset relative to this zero point. For each data point obtained from the PLC, its timestamp is also converted into an offset relative to the same zero point. Then, a unified time grid is created, for example, with 100 millisecond intervals, from 30 minutes before the defect occurs to the time when the defect occurs, generating a series of time slices. For each time slice, the system traverses all data sources and finds the data point closest to that time slice.
[0120] For continuous numerical data, such as temperature, pressure, and duty cycle, forward filling or linear interpolation methods are used to map the original sampled values onto the time grid. If there are multiple original data points within a certain time slice, the last value or the average value is taken, depending on the data characteristics. For discrete state data, such as controller modes and alarm events, the system uses a hold method, that is, the state changes at the time of the event and is maintained until the time of the next event.
[0121] After completing the time grid alignment, all data is integrated into a multidimensional table, with each row corresponding to a time slice and each column corresponding to a data variable, including the original sensor process parameters and control parameters, feedback parameters, alarm signs, operation records, etc. obtained from the PLC. This is the dataset used to verify the logic in step S404.
[0122] The fusion process ensures that data from different sources are strictly synchronized in time, providing a reliable basis for subsequent fault mode determination.
[0123] Step S404: Perform specific failure mode determination based on the multidimensional verification dataset generated in step S403. For each potential root cause parameter, make logical judgments according to the following three types of verification scenarios. Each type of scenario corresponds to a clear quantitative judgment condition, and a corresponding verification gain term Δ is introduced to correct the confidence level.
[0124] (1) Scenario 1: Used to identify sensor drift faults.
[0125] First, compare the deviation between the actual output value of the control command and the theoretical set curve. The set curve is generated according to the process recipe, such as the curve of the PWM duty cycle set value of the fifth temperature zone of reflow soldering changing with time. Calculate the absolute deviation between the actual PWM duty cycle sequence and the set curve at each time point. If the maximum deviation at all time points is less than 5%, the control command is considered to be consistent with the set curve. At the same time, check the feedback signal of the actuator, such as the heater current. Its value should be within the normal range. For example, for a heater with a rated current of 10A, the measured current between 9A and 11A is considered normal.
[0126] Under the premise that the control commands are consistent and the actuator feedback is normal, compare the readings of the two redundant sensors, the K-type thermocouple and the infrared thermometer. If the absolute value of the deviation between the two exceeds 3 degrees Celsius for three consecutive times, which is the cross-verification threshold set in step S105, it is determined to be a sensor drift fault. At this time, the verification gain term Δ is taken as 15%.
[0127] (2) Scenario 2: Used to identify actuator faults. First, check if the control command is abnormal, such as the PWM duty cycle being continuously saturated, that is, maintaining above 95% for a long time without falling back. At the same time, check if the actuator feedback is abnormal, such as the heater current being continuously zero or far below the normal value.
[0128] If the sensor reading deviates significantly from the set value, for example, by more than 10%, under the condition of abnormal control command and abnormal feedback from the actuator, it is determined that the actuator is faulty, such as the heater is open-circuited or the drive is damaged. In this case, the verification gain term Δ is taken as 25%.
[0129] (3) Scenario 3: Used to identify control logic abnormalities. First, confirm that the control command is consistent with the set curve and the actuator feedback is normal, but the sensor reading deviates significantly from the process set value, for example, the deviation exceeds 10%. At the same time, check the controller mode. If the controller is in manual mode or there is a recent operation record of manually modifying parameters, it is determined that the control parameters are abnormal. At this time, verify that the gain term Δ is 20%.
[0130] The judgment results of the above three scenarios serve as verification conclusions, used to update the confidence level of the root cause. The updated confidence level calculation formula is as follows: in, The contribution value calculated in step S305. Based on the above verification logic, the values are 15%, 25%, or 20%, respectively.
[0131] If the verification conclusion is inconsistent with the root cause of the Bayesian network inference, for example, the inference believes that the temperature abnormality is due to heater failure, but the verification determines that it is due to sensor drift, then the system triggers secondary inference.
[0132] The specific implementation of the secondary inference is as follows: A Boolean node S is added to the original Bayesian network to represent the sensor drift state. This node serves as the parent node of the corresponding temperature sensor node. For example, for the fifth temperature zone T5, the new edge S points to T5. The conditional probability table of the new node is set according to expert experience. For example, when S is true, the probability of T5 being abnormal is set to 0.9; when S is false, the probability of T5 being abnormal remains the original conditional probability. Then, the verification conclusion, i.e., S being true, is used as the new evidence input, and the joint tree algorithm is called again to calculate the posterior probability of all nodes, thus achieving closed-loop correction.
[0133] Step S405: After the confidence level correction is completed, the key evidence chain generated during the verification process is attached to the diagnostic report in a visual form. The evidence chain includes a comparison waveform of the PWM duty cycle and the set curve, a comparison curve of the temperature of the two sensors, an alarm log timeline, etc.
[0134] Relevant time series data are extracted from the multidimensional verification dataset in step S403. Front-end charting libraries such as ECharts or D3.js are called to generate vector graphics in SVG format. These graphics are then embedded into an XML report. This allows operations and maintenance personnel to intuitively see the data changes before and after the anomaly, enhancing the interpretability of the diagnostic results.
[0135] Step S406: Integrate all verified information into a structured root cause diagnosis report. The report uses Extensible Markup Language (XML) format to ensure the universality and parsability of data exchange. The report includes the following main fields: The defect type code is the F-value output by the automatic optical inspection equipment; the Top-N root cause list contains a parameter name, the measured value of the parameter, the standard process range of the parameter, the contribution value, and the updated confidence value for each entry; the standard process range is obtained from the process specification table stored in the central process database, which records the nominal value, upper and lower limits, etc. of each parameter; the verification conclusion field outputs one of three conclusions based on the judgment result of step S404: sensor drift, actuator failure, or parameter deviation; the recommended remedial measures field provides specific operational suggestions for each root cause, such as calibrating thermocouples, replacing heaters, checking controller modes, etc.
[0136] In step S407, the generated XML report is pushed to the human-machine interface of the operations and maintenance personnel in real time via the WebSocket protocol to ensure timely delivery of information; simultaneously, the system automatically triggers the work order generation module, which embeds a rule engine such as Drools, pre-stores mapping rules from root cause to action task. Rules are defined in condition-action form, for example: Rule 1: When the root cause is equal to thermocouple drift and the equipment is the fifth temperature zone of a reflow oven, a maintenance work order is generated. The work order type is calibration, the specified equipment is the reflow oven, the specified component is the fifth temperature zone thermocouple, and the priority is medium.
[0137] Rule 2: When the cause is insufficient solder paste thickness and the equipment is a solder paste printer, an automatic adjustment command is generated. The command is to increase the squeegee pressure by 0.2 MPa. The command is sent directly to the PLC controller of the solder paste printer through the write service of the OPC UA protocol and written to the corresponding control register. After successful writing, the PLC will immediately perform pressure adjustment.
[0138] After a work order is generated, it enters the operation and maintenance management system for processing. Once the repair is completed, the system will record the handling results and provide feedback to the online learning module for continuous optimization of the model.
[0139] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for troubleshooting PCB circuit board production lines, characterized in that, include: The system collects process parameters for multiple steps in the PCB manufacturing process in real time and adds a high-precision timestamp based on the IEEE 1588 precision time protocol to each process parameter. Based on the high-precision timestamp, the process parameters of different processes corresponding to the same PCB circuit board are time-aligned and encapsulated into a full-link process parameter record. A data quality tag is attached to each process parameter in the end-to-end process parameter record. The data quality tag is used to characterize the reliability of the parameter during the acquisition process. The entire process parameter records are used as evidence variables and input into a preset causal reasoning model. The causal reasoning model is used to describe the causal relationship between process parameters and welding defect types. Based on the evidence variables and the data quality labels, probabilistic reasoning is performed through the causal reasoning model to calculate the contribution of the process parameters of each upstream process to the current defect, wherein the data quality labels are used as weighting factors in the calculation of the contribution. Based on the stated contribution, the root cause parameters leading to the defect are determined.
2. The PCB circuit board production line fault handling method according to claim 1, characterized in that, The system collects process parameters for multiple steps in the PCB manufacturing process in real time and adds a high-precision timestamp synchronized based on the IEEE 1588 precision time protocol to each process parameter, including: Deploy sensor arrays at key process nodes of solder paste printers, pick and place machines, reflow ovens, and automated optical inspection equipment, and establish data links through network switches that support transparent clock functionality; The clock synchronization module ensures that the slave clocks of each sensor node are synchronized with the master clock of the central time server at the nanosecond level, ensuring that the error of the timestamps carried by each sensor data relative to the real time is less than 100 microseconds. A local cache queue is configured within the sensor data acquisition program. When a network connection interruption is detected, the acquired data is stored in the cache queue. After the communication link is restored, the data is retransmitted to the central process database in timestamp order, and a retransmission mark is added to the retransmitted data record.
3. The PCB circuit board production line fault handling method according to claim 2, characterized in that, Attach a data quality label to each process parameter in the end-to-end process parameter record, including: The sensor health status is obtained, which is derived from the sensor's own self-test diagnosis results or the indirect judgment of the reasonableness of the sensor's output signal by the acquisition unit; The reliability of the acquisition timestamp is obtained, and the reliability of the acquisition timestamp is calculated based on the clock synchronization deviation synchronized by the IEEE1588 protocol; The data integrity is determined based on whether the end-to-end process parameter record is a real-time transmission or includes the retransmission marker. The sensor health status, the reliability of the acquisition timestamp, and the data integrity are used as the data quality labels.
4. The PCB circuit board production line fault handling method according to claim 1, characterized in that, The causal reasoning model is a Bayesian network, and the method for constructing the Bayesian network includes: Define a set of nodes, which includes nodes corresponding to key process parameters of each process and nodes corresponding to defect types output by automated optical inspection equipment; By combining the physical mechanism of welding process and IPC industry standards, the causal edges between each process parameter node and defect type node are determined to form a network structure; Based on historical process parameter records, initialize the conditional probability table corresponding to each causal edge. The conditional probability table is used to quantify the degree of influence of the parent node state on the child node state. For parameter combinations with extremely low frequency in historical data, domain expert knowledge is introduced to correct null values or unreliable statistical values in the conditional probability table.
5. The PCB circuit board production line fault handling method according to claim 4, characterized in that, Based on the evidence variables and the data quality labels, probabilistic reasoning is performed using the causal reasoning model to calculate the contribution of each upstream process parameter to the current defect, including: The joint tree propagation algorithm is invoked to perform probabilistic inference and obtain the posterior probability that each process parameter node is in an abnormal state under the condition of known defect type. Statistically determine the prior anomaly probability of each process parameter during normal historical production processes; For each process parameter, the contribution of that parameter to the current defect is obtained by subtracting the prior anomaly probability from the posterior probability. In the probability calculation process of the joint tree propagation algorithm, for each input process parameter, a weight coefficient between 0 and 1 is generated based on its corresponding data quality label, and the original contribution value is multiplied by the weight coefficient to adjust the contribution weight of the parameter to the root cause judgment.
6. The PCB circuit board production line fault handling method according to claim 1, characterized in that, After determining the root cause parameters leading to the defect based on the contribution, the method further includes: Based on the determined root cause parameters, query the programmable logic controller log of the corresponding production equipment to obtain the underlying control data, which includes at least one of control instructions, actuator feedback signals, equipment alarm logs, and operation records. The underlying control data and the process parameters are fused along a time axis to form a multidimensional verification dataset. Failure mode determination is performed based on the multidimensional validation dataset to verify the root cause parameters and generate validation conclusions. Based on the verification results, update the confidence level of the root cause parameter.
7. The PCB circuit board production line fault handling method according to claim 6, characterized in that, The step of performing fault mode determination based on the multidimensional validation dataset to verify the root cause parameters and generate validation conclusions includes: If the control command is consistent with the set curve and the actuator feedback is normal, but the reading deviation of the two redundant sensors exceeds the preset threshold, a verification conclusion of sensor drift fault is generated, and the corresponding first verification gain term is determined. If the control command is determined to be abnormal and the actuator feedback is abnormal, and the sensor reading deviates from the set value by more than the preset range, a verification conclusion of actuator failure is generated, and the corresponding second verification gain item is determined. If the control command is consistent with the set curve and the actuator feedback is normal, but the sensor reading deviates from the process set value beyond the preset range, and the controller mode is in manual mode or there is a record of manual parameter modification, then a verification conclusion of control logic abnormality is generated, and the corresponding third verification gain item is determined. The process of updating the confidence level of the root cause parameter specifically involves adding the contribution of the root cause parameter to the corresponding validation gain term to obtain the updated confidence level.
8. The PCB circuit board production line fault handling method according to claim 7, characterized in that, The method further includes: When the verification conclusion is inconsistent with the root cause based on Bayesian network reasoning, a secondary inference is triggered; A new node corresponding to the verification conclusion is added to the Bayesian network, and the verification conclusion is used as a new evidence variable input. The joint tree propagation algorithm is called again to calculate the posterior probability of all nodes, thereby achieving closed-loop correction.
9. The PCB circuit board production line fault handling method according to claim 1, characterized in that, The method further includes: The entire process parameter record is structured and packaged according to the unique serial number of the PCB board, and then written into a distributed time-series database. The distributed time-series database uses a log structure merge tree as the underlying storage engine and employs a joint sharding strategy for data sharding. The sharding key of the joint sharding strategy is composed of the hash value of the board serial number, the time window to which the data belongs, and the production line number.
10. A PCB circuit board production line fault handling system, applied to the PCB circuit board production line fault handling method according to any one of claims 1 to 9, characterized in that, include: Sensor arrays are deployed at key process nodes of solder paste printers, pick-and-place machines, reflow ovens, and automated optical inspection equipment to collect process parameters in real time. The clock synchronization module is used to add a high-precision timestamp to each acquired process parameter based on the IEEE 1588 precision time protocol. The central process database is used to store process parameters and, based on the high-precision timestamp, to align the process parameters of different processes corresponding to the same PCB circuit board in time sequence and encapsulate them into a full-link process parameter record. The data processing module is used to attach a data quality label to each process parameter in the end-to-end process parameter record. The data quality label is used to characterize the reliability of the parameter during the acquisition process. The root cause localization engine has a pre-stored causal reasoning model. The causal reasoning model is used to describe the causal relationship between process parameters and welding defect types. The root cause localization engine is used to input the full-link process parameter records as evidence variables and the data quality labels as weighting factors into the causal reasoning model for probabilistic reasoning, calculate the contribution of the process parameters of each upstream process to the current defect, and determine the root cause parameters that cause the defect based on the contribution.