The present invention relates to a classification system, in particular to an electronic component packaging type classification system using artificial neural network to execute classification.
Nowadays, the design and assembling processes of electronic circuits are gradually automated with the development of technology. In the process of designing a printed circuit board, it is necessary to import the footprint library, execute the PCB parameter setup, placement and routing before the final stage (known as a Design For Manufacture Check or DFM Check).
Before the DFM check is executed, the conventional process is that a layout engineer classifies the packaging types of all electronic components of a printed circuit board manually. To determine the packaging types of the electronic components, the layout engineer usually depends on checking the names of the electronic component patterns, as well s the pin number and the pin arrangement from the appearance. The above process should depend on the working experience of the engineer; however, the engineer cannot make sure that the packaging types of the electronic components are correctly classified.
With the advance of packaging technology, the packaging types of various electronic components are becoming more diverse; besides, some electronic component patterns of some packaging types are very similar. For the layout engineers, it is more difficult to determine the packaging type of one electronic component according to its electronic component pattern. Further, if the layout engineers fail to correctly determine the packaging types of the electronic components, the working process of the layout engineers, the yield rate and the product quality of the assembling factories will be influenced.
All of the above shortcomings show that various problems that occur during the conventional operation process for the electronic component packaging type classification. Therefore, it has become an important issue to develop a packaging type classification tool to assist the layout engineers to reduce the error rate of the electronic component packaging type classification.
To achieve the foregoing objective, the present invention provides an electronic component packaging type classification system using an artificial neural network to perform classification, and the electronic component packaging type classification system includes a service database, an external database, a feature selection module, a data-integration module and a classification processing module.
The service database receives electronic component patterns externally inputted and receives training data with input and output data related thereto. The external database stores the packaging type data of a plurality of electronic components. The feature selection module is connected to the external database; the feature selection module records the packaging type features of the electronic components and inputs the electronic component patterns to be classified according to the service database, wherein the feature selection module performs the feature selection from the external database according to the packaging type features.
The data-integration module performs the data pre-processing and the normalization for the feature value of the feature selected by the feature selection module in order to remove incorrect noises, fill data loss and limit the feature value of the selected feature in a specific interval to obtain the data to be classified. The classification processing module receives the data to be classified and displays the classification result on the service database.
In an embodiment of the present invention, the classification processing module includes a processor for storing and executing the instruction of an operation, and the operation includes: a user end inputting the electronic component patterns to be classified into the service database; the feature selection module performing the feature selection from the external database according to the packaging type features of the electronic component patterns; the data-integration module performing the data pre-processing and the normalization for the feature value of the selected feature to obtain the data to be classified; and the service database obtaining the classification result of the packaging types of the electronic components.
In an embodiment of the present invention, the electronic component packaging type classification system further includes a training module and a parameter storage module, wherein the training module is connected to the data-integration module and the service database, and determines a training scale and the neural network parameters of a training data set for following classification, wherein the convergence condition of training is that the cumulative error is lower than a given threshold value after the current training ends. The parameter storage module is connected to the training module and the service database, and records the training parameter data used by the training module.
In an embodiment of the present invention, the data-integration module normalizes the feature value to the interval between va and vb to conform to
the equation, where v′ stands for the feature value after being normalized to va and vb, v stands for the feature value needed to be normalized, vmax stands for the largest feature value of one feature and vmin is the smallest feature value of one feature.
In an embodiment of the present invention, the training module integrates the feed-forward neural network structure with the backpropagation algorithm.
In an embodiment of the present invention, the neural network parameters are any one of the convergence condition, the neuron number of the hidden layer, the number of the hidden layers, the initial learning rate, the initial momentum, the threshold value, the weight and the bias or the combination thereof.
In an embodiment of the present invention, the convergence condition of training is that the cumulative error is lower than 1/15000 of the cumulative error of the previous training after the current training ends; vtrmse stands for the cumulative RMSE of the current training and vt-1rmse stands for the cumulative RMSE of the previous training; vtrmse and vt-1rmse conform to the equation,
where vtrmse and vt-1rmse conform to the equation,
where vrmse stands for the cumulative RMSE after each training result, cd i stands for the data amount of the training data set, cd stands for the output bit number of neural network, vkc stands for the target value of the classification result and vk(t)a stands for the approximate value of the current classification result.
In an embodiment of the present invention, the training scale includes an input layer, a hidden layer and an output layer; the output layer is the feature number of the inputted packaging type, the number of the hidden layers is 1, and the output layer is 10 packaging types of classification output.
In an embodiment of the present invention, the packaging types outputted are the ball grid array (BGA), the quad flat package (QFP), the quad flat no-lead (QFN), the small outline integrated transistor (SOT), the small outline integrated circuit (SOIC), the small outline integrated circuit no-lead (SON), the dual flat no-lead (DFN), the small outline diode (SOD), the small SMC chip and the metal electrode leadless face (MELF).
In an embodiment of the present invention, the neuron number of the hidden layers conforms to the equation, (x×(input+output)) 4.5<x<2, where the input stands for 19 packaging type features and the output stands for the 10 packaging types of classification output.
In an embodiment of the present invention, the classification type data record any one of the component outline information, the limited area information of printed circuit board, the drill information, the geometrical form parameter, the applicable site parameter, the electrical parameter and the joint parameter or the combination thereof.
In an embodiment of the present invention, the packaging type features include the physical appearance of electronic component, the physical pin of electronic component and the pattern of electronic component.
In an embodiment of the present invention, the weight ratio of the packaging type features is that the pattern of electronic component is higher than the physical appearance of electronic component, and the physical appearance of electronic component is higher than the physical pin of electronic component.
In an embodiment of the present invention, the physical appearance of electronic component, the physical pin of electronic component and the pattern of electronic component are selected from the group consisting of 19 kinds of features, the number of pins from electronic component, the original physical length of electronic component, the maximal physical length of electronic component, the minimal physical length of electronic component, the original physical width of electronic component, the maximal physical width of electronic component, the minimal physical width of electronic component, the physical height of electronic component, the distance between the physical body of electronic component and circuit board, the pin length of large electronic component, the pin width of small electronic component, the pin length of large electronic component pattern, the pin length of small electronic component pattern, the pin width of large electronic component pattern, the pin width of small electronic component pattern, the X-axis direction of pin interval of electronic component pattern and the Y-axis direction of pin interval of electronic component pattern.
The technical effects of the present invention are as follows: the artificial neural network can be trained via the physical features of the electronic components so as to find out the training scale and the neural network parameters most appropriate to the classification system; besides, the correct rate of the normalized training result is higher than that of the training result not normalized, which can solve the problems that manually classifying the packaging types of the electronic components tends to result in mistakes, is time-consuming and seriously depends on the working experience of layout engineers, and can further better the quality of the training and the classification result.
For a better understanding of the aforementioned embodiments of the invention as well as additional embodiments thereof, reference should be made to the Description of Embodiments below, in conjunction with the following drawings in which like reference numerals refer to corresponding parts throughout the figures.
The following description is about embodiments of the present invention; however, it is not intended to limit the scope of the present invention.
With reference to
The service database 1 receives electronic component patterns externally inputted and receive training data with input and output data related thereto, where the file format of the electronic component patterns is converted by the electronic design automatic (EDA) tool.
The external database 3 stores the packaging type data of a plurality of electronic components, where the classification type data record any one of the component outline information, the limited area information of printed circuit board, the drill information, the geometrical form parameter, the applicable site parameter, the electrical parameter and the joint parameter or the combination thereof.
The feature selection module 4 is connected to the external database 3; the feature selection module 4 records the packaging type features of the electronic components and inputs the electronic component patterns to be classified according to the service database 1, where the feature selection module 4 performs the feature selection from the external database 3 according to the packaging type features.
The packaging technologies for combining electronic components with circuit boards can be roughly classified into the through hole technology (THT) and the surface mount technology (SMT). Thus, the embodiment classifies the basic SMT-type electronic component packaging methods into 44 types according to pin form, pin type, size and function; the embodiment selects the most frequently used 25 types and classifies them into 10 packaging types in order to satisfy the requirements of layout engineers determining the packaging types.
During the stage, the feature selection module 4 obtains 19 features from the 25 SMT packaging types and obtains the feature values in order to provide the feature values for the data-integration module 5 to perform the data preprocessing.
More specifically, there are 19 kinds of packaging type features about the physical appearance of electronic component, the physical pin of electronic component, the electronic component pattern, etc. Moreover, the features about the physical appearance of electronic component are the pin number of electronic component, the original physical length of electronic component, the maximal physical length of electronic component, the minimal physical length of electronic component, the original physical width of electronic component, the maximal physical width of electronic component, the minimal physical width of electronic component, the physical height of electronic component, the distance between the physical body of electronic component and circuit board.
The features about the physical pin of electronic component are the pin length of large electronic component, the pin length of small electronic component, the pin width of large electronic component, and the pin width of small electronic component. The features about the electronic component pattern are the pin length of large electronic component pattern, the pin length of small electronic component pattern, the pin width of large electronic component pattern, the pin width of small electronic component pattern, the X-axis direction of pin interval of electronic component pattern, the Y-axis direction of pin interval of electronic component pattern.
In the embodiment, the weight ratio of the packaging type features is that the pattern of electronic component is higher than the physical appearance of electronic component, and the physical appearance of electronic component is higher than the physical pin of electronic component.
The data-integration module 5 performs the data pre-processing and the normalization for the feature value of the feature selected by the feature selection module 4 in order to remove incorrect noises and fill data loss and limit the feature value of the selected feature in a specific interval to obtain the training data set. More specifically, if the data processed by the data-integration module 5 are the electronic component patterns to be trained, the data are termed as the training data set for the training module to perform training; if the data processed by the data-integration module 5 are the electronic component patterns to be classified, the data are termed as the data to be classified, which are used to serve as the classification result of the packaging types.
The preprocessing is to perform data-integration, data cleaning, data loss filling and data conversion. More specifically, the object of data-integration is to solve the problems that the data are not consistent, have different units, or need to be deduplicated because the data are obtained from different databases. If the data are not consistent, the training process may not easily converge or the training result may be influenced because the columns may have different ways to present data, which may form a data set not favorable to be trained. For this reason, the data-integration is the first step in the data preprocessing.
Further, the objects of the data cleaning and the data loss filling are to ensure that the completeness, correctness and reasonableness of the data. As the data sources are diverse, the stage should check whether the features are reasonable. The features selected herein are the parameters of the electronic components, so the data loss can be filled by the overall average value.
The object of the data conversion is to convert the data into the data which can be easily trained or increase the credibility of the training result. More specifically, the tasks of the stage include data generalization, creating new attributes and data normalization. Data generalization is to enhance the concepts and meanings of the data in order to decrease the types of the feature values included in the features. Creating new attributes means finding out the new attributes needed by the training from the old attributes. Data normalization means converting the data recorded by different standards or units into the data with the same standard; the normalized data will be re-distributed over a specific and smaller interval so as to increase the accuracy of the training result. The most frequently used normalization methods include extreme value normalization, Z-score normalization and decimal normalization.
In the embodiment, the data-integration module 5 normalizes the feature value to the interval between va and vb to conform to the equation,
where v′ stands for the feature value after being normalized to va and vb, v stands for the feature value needed to be normalized, vmax stands for the largest feature value of one feature and vmin stands for the smallest feature value of one feature.
The embodiment uses the normalized training data set and non-normalized training data set in the experiment for comparison. The training conditions, including the number of features, the data amount, the number of the outputted nodes and the artificial neural network (also called neural network), are as shown in Table 1:
Please refer to Table 2 and Table 3. Table 2 shows the training result of the normalized training data set; Table 3 shows the training result of the non-normalized training data set. The embodiment uses i-j-k to describe the structure of the neural network, where i stands for the neuron number of the input layer, j stands for the neuron number of the hidden layer and k stands for the neuron number of the output layer.
According to the results shown in Table 2 and Table 3, the average correct rate of the normalized data set, No. (19-50-10), is 99.2% and the average correct rate of the non-normalized data set, No. (19-53-10), is 51.8%. Therefore, the performance of the classification result of the normalized data set is better than that of the classification result of the non-normalized data set by 55.9%.
In addition, the distance between the feature values of all features can decrease after the normalization of the data set; accordingly, the artificial neural network can more easily calculate the weight of the connection between the neurons. If the data fail to be normalized, the weight may exceed the interval of the activation function and cannot be correctly adjusted, so the artificial neural network will converge too soon and fail to achieve the training and learning effects.
The present invention makes the features re-distribute over a specific interval via extreme value normalization in order to better the efficiency of training the artificial neural network. Besides, the correct rate of the normalized training result is higher than that of the non-normalized training result.
The training module 6 integrates the feed-forward neural network (FNN) structure with the backpropagation algorithm; the backpropagation algorithm belongs to the multi-layer feed-forward neural network and divides the neural network into the input layer, the hidden layer and the output layer. The input layer serves as the terminal for receiving data and inputting messages in the network structure; the neuron number of the input layer means the number of the training features included therein, which stands for the variables inputted into the network.
The hidden layer is between the input layer and the output layer, which is used to show the situation of the mutual influence between the units. The trail-and-error method is the best way to find out the neuron number of the hidden layer. The more the neuron number is, the lower the convergence speed and the error will be. The output layer serves as the terminal for processing training results and outputting messages in the network structure, which stands for the variables outputted from the network.
The backpropagation algorithm is used to minimize the error and find out the weights of the connections between the input layer, the hidden layer and the output layer, as shown in
Afterward, hj is substituted into the activation function ƒtanh to generate the output of the hidden layer, which also serves as the input of the next layer. So as to simulate the operation mode of the biological neural network, the activation function is usually a non-linear conversion; the conventional activation functions are the hyper tangent function and the sigmoid function [28], as shown in the following equations:
The activation function used by the hidden layer is the hyper tangent function; the output uses the sigmoid function. w1,1HO, w1,2HO, w1,3HO . . . wj,kHO stand for the weights of the connections between the neurons of the hidden layer and the neurons of the output layer; bkO stands for the biases of the neurons of the output layer; O1, O2, . . . , Ok stand for the sum of the product of the input items ƒtanh(hj) and the weights wj,kHO. Finally, Ok is substituted into the activation function ƒsig(Ok) to generate the outputs yk of the neurons, as shown in the equation, yk(O)=ƒsig(Ok).
When failing to reach the convergence condition, the backpropagation neural network will calculate the error between the output result and the target result, then re-adjust the weight and re-start the training until the convergence condition is reached, as shown in the equation, wt=(wt-1+Δw).
The training module 6 is connected to the data-integration module 5 and the service database 1, and determines the training scale of training the training data set and the neural network parameters to serve as the bases of the following classification; then, the training result is transmitted to the service database 1, where the convergence condition is that the cumulative error is lower than the given threshold value after the current training ends. Please refer to
Moreover, when executing the neural network initialization stage, the system asks for that the neural network parameters should be inputted, and the weights and the biases should be initialized first. The three neural network parameters set in the stage are the initial learning rate, the initial momentum and the node number of the hidden layer.
Initial learning rate: when the initialization is implemented, the learning rate will be set within the interval [0,1]. The embodiment uses the self-adaptive learning rate adjustment method, which will determine whether the training direction is correct according to the cumulative error of the training of each time. If the error tends to decrease, it means the training direction is correct; in this way, the learning speed can increase. On the contrary, if the error tends to increase, the penalty factors will be added to reduce the learning speed and decrease the learning progress; then, the training direction should be modified.
Initial momentum: in addition to the setting of the learning rate, the value of the momentum will also influence the learning efficiency of the neural network. The major function of the momentum is to stabilize the oscillation phenomenon caused by calculating the weights after the learning rate is adjusted. During the initialization process, the parameters can be set within the interval [0,1], just like the learning rate. The system will automatically add the parameters for adjustment when adjusting the learning rate and the weights each time.
Node number of the hidden layer: the node number of the hidden layer will influence the convergence speed, the learning efficiency and the training result. The embodiment adopts the trail-and-error method.
The convergence condition can be set be that the training stops after the maximal training times are reached or the cumulate error is lower than a given threshold value. More specifically, the maximal training times mean that the training stops after the training times reach the predetermined maximum, which shows the training cannot make the neural network exactly converge; thus, it is necessary to adjust the neural network parameters or check whether the training data set is abnormal. If one of the above conditions is reached, the training ends.
In the embodiment, the convergence condition of the training is that the training stops when the cumulative error is lower than 1/15000 of the previous training after the current training ends. vtrmse stands for the RMSE accumulated by the current training; vt-1rmse stands for the RMSE accumulated by the previous training, which conform to the equation:
conform to the equation:
where vrmse stands for the RMSE accumulated by the training result each time; cd stands for the data volume of the training data set; co stands for the number of the bits outputted by the neural network; vkc stands for the target value of the classification result; vk(t)a is the approximate value of the current classification result.
Furthermore, the neural network parameters are any one of the convergence condition, the neuron number of the hidden layer, the number of the hidden layers, the initial learning rate, the initial momentum, the threshold value, the weight and the bias or the combination thereof.
Please refer to
The embodiment uses i-j-k to describe the neural network structure, where i stands for the neuron number; j stands for the neuron number of the hidden layer; k stands for the neuron number of the output layer. x1˜xi stand for the inputted feature value; hj is calculated according to the weights wi,jIH of the connections between the input layer and the hidden layer by using the equation, hj(X)=Σi=1N(xi·wi,jIH)+bjH. Then, the value of hj processed by the activation function ƒtanh is used as the input value of the connection between the hidden layer and the input layer, and which is multiplied by the weights wj,kHO of the connections between the hidden layer and the output layer; afterward, Ok can be obtained by the equation, Ok(H)=Σj=1M(ƒtanh(hi)·wj,kHO)+bkO. Finally, the classification result yk of each piece of data can be obtained via the activation function by using the equation, yk(O)=ƒsig (Ok).
Please refer to
The way of adjusting the weight is to make the calculation from the output layer to the input layer in order to calculate the four gradients respectively, including the bias gradient of the output layer, the weight gradient from the hidden layer to the output layer, the bias gradient of the hidden layer and the weight gradient from the hidden layer to the output layer; then, the variation can be calculated according to the gradients. Finally, the weights should be modified according to the variation and the momentum.
When adjusting the weights, the first step is to calculate the bias gradient gkOB of the output layer, the gradient gk,jOH from each of the nodes between the output layer and the hidden layer, the bias gradient gkHB of the hidden layer and the gradient gj,iHI of each of the nodes between the hidden layer and the input layer. vkc stands for the target value of the kth output and vk(t)a stands for the approximate value of the kth output, which conform to the equations gkOB=(vkc−vk(t)a), gk,jOH=Σj=1M(gkOB·wj,kHO), gkHB=(vkc−vk(t)a and gj,iHI=Σi=1N(gjHB·wi,jIH).
The next step is to calculate the variation ΔbkO of the bias of the output layer, the variation Δwj,kHO of the weight from the output layer to the hidden layer, the variation ΔbjH of the bias of the hidden layer and the variation Δwi,jIH of the weight from the input layer to the hidden layer. During the calculation process, the variations are multiplied by the learning rate η to more obviously adjust the variations, which conforms to the equations, ΔbkO=gkOB×η, Δwj,kHO=gj,kHO×η, ΔbjH=gjHB×η and Δwi,jIH=gi,jIH×η.
Finally, the variations of the gradients and the weights can be used to update the weights wi,j(t)IH of the connections between the input layer and the hidden layer, the bias bj(t)H of the hidden layer, the weights wj,k(t)HO of the connections between the hidden layer and the output layer and the bias bj(t)O of the output layer, and the which are multiplied by the momentum in order to reduce the oscillation during the training process due to the adjustment of the weights and serve as the parameters of the next training. The above process conforms to the equations, wi,j(t)IH=(wi,j(t-1)IH+Δwi,jIH)×Mmom, bj(t)H=(bj(t-1)H+ΔbjH)×Mmom, wj,k(t)HO=(wj,k(t-1)HO+Δwj,kHO)×Mmom and bk(t)O=(bk(t-1)O+ΔbkO)×Mmom.
The stage adopts the self-adaptive learning rate to serve as the factor of calculating the variation of the weight. The adjustment of the learning rate will compare the previous training result vt-1rmse with the current training result vtrmse in order to determine whether the learning direction is correct. If the learning direction is correct, the learning rate will be added with the incentive factors to make the next training faster; thus, the learning process can be more early reach the convergence condition. On the contrary, if the learning direction is incorrect, the learning rate will be added with the penalty factors to slow down the learning speed so as to maintain the learning effect. The equation is as follows:
The RMSE obtained by the training process each time can be used to adjust the weights and the learning rate to make the training process move in the correct direction in order to avoid that the training process fails to converge during the training process.
In the embodiment, the training scale includes a training layer, a hidden layer and an output layer. More specifically, the input layer is the number of the features of the inputted packaging types; the number of the hidden layer is 1 and the output layer is the number of the packaging types of the classification output, where the number of the features of the input layer is 19 and the number of the packaging types of the classification output is 10.
The neuron number j of the hidden layer conforms to (x×(input+output)), 1.5<x<2, wherein input is 19 features of inputted packaging types and output is 10 packaging types of the classification output. Preferably, when the neuron number of the hidden layer is close to the above equation, the better training and the training classification result can be obtained.
More specifically, the packaging types outputted are the ball grid array (BGA), the quad flat package (QFP), the quad flat no-lead (QFN), the small outline integrated transistor (SOT), the small outline integrated circuit (SOIC), the small outline integrated circuit no-lead (SON), the dual flat no-lead (DFN), the small outline diode (SOD), the small SMC chip and the metal electrode leadless face (MELF).
The parameter storage module 7 is connected to the training module 6 and the service database 1; the parameter storage module 7 is used to record the training parameter data used by the training module 6.
Please refer to
The classification processing module 8 includes a processor storing and executing the instruction of an operation, and the operation includes the following steps.
The first step is Step 91: a user end inputs the electronic component patterns to be classified into the service database 1; then, the second step is Step 92: the feature selection module 4 performs the feature selection from the external database 3 according to the packaging type features of the electronic component patterns.
Afterward, the third step is Step 93: the data-integration module 5 performs the data pre-processing and the normalization for the feature value of the selected feature to obtain the data to be classified.
The Final step is Step 94: the service database 1 obtains the classification result of the packaging types of the electronic components.
The present invention uses the feature training neural network of 19 physical electronic components to find out the training scale and the neural network parameters most suitable for the classification system. Moreover, the correct rate of the normalized training result is higher than that of the non-normalized training result. Furthermore, when the neuron number of the hidden layer satisfies (x×(input+output)), 1.5<x<2, the system can obtain better training result and better classification result of the training.
To sum up, the present invention applies the artificial neural network to the electronic component packaging classification system. Via the cooperation relations between the service database 1, the external database 3, the feature selection module 4, the data-integration module 5, the training module 6, the parameter storage module 7 and the classification processing module 8, and the integration of the backpropagation artificial neural network, the present invention can solve the problems that manually classifying the packaging types of the electronic components tends to result in mistakes, is time-consuming and seriously depends on the working experience of layout engineers, and can further better the quality of the training and the classification result, which can definitely achieve the objects of the present invention.
The above disclosure is related to the detailed technical contents and inventive features thereof. Those skilled in the art may proceed with a variety of modifications and replacements based on the disclosures and suggestions of the invention as described without departing from the features thereof. Nevertheless, although such modifications and replacements are not fully disclosed in the above descriptions, they have substantially been covered in the following claims as appended.