A data-driven electric nail gun fault type identification method
By collecting current, voltage, and energy consumption data of electric nail guns, and combining support vector machine and random forest algorithms, a fault identification model was established. This solved the problem that automated detection platforms had difficulty identifying faults in electric nail guns, achieving efficient and accurate fault type identification and improving the efficiency of automated detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TAIZHOU RES INST ZHEJIANG UNIV OF TECH
- Filing Date
- 2022-12-29
- Publication Date
- 2026-07-07
AI Technical Summary
Existing automated inspection platforms struggle to accurately identify the fault types of electric nail guns, and a large amount of data is not fully utilized, resulting in low inspection efficiency.
By collecting current, voltage, and energy consumption data of electric nail guns during operation, and combining the support vector machine algorithm with time-domain and frequency-domain feature analysis, and using the random forest algorithm for dimensionality reduction, a fault identification model is established to achieve efficient identification of electric nail gun fault types.
It improves the accuracy and automation of fault identification in electric nail guns, reduces labor costs, and achieves efficient and accurate fault type identification.
Smart Images

Figure CN115828164B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fault identification technology, and specifically to a data-driven method for identifying fault types in electric nail guns. Background Technology
[0002] Electric nail guns play an important role in many fields such as the decoration and construction industries, and are one of the essential basic tools in the construction process. With the rapid development of technology, product testing technology is constantly being updated. Traditional manual testing requires a large investment of manpower and resources, and the duration and accuracy of the test are often determined by the operator's condition. Automated control testing platforms, due to their high efficiency, low cost, and high precision, are gradually replacing traditional manual testing. Testing technology is gradually shifting from "manual" to "automated" and "intelligent." However, this technological shift has also exposed a series of problems. On the one hand, the factory's requirements for fault detection and fault type identification of electric nail guns have not changed, and complex working conditions often prevent automated equipment from accurately identifying and classifying faults in power tools, thus hindering fully automated start-stop control and recording of the test. On the other hand, most of the data collected during the test is simply stored and not fully utilized, resulting in data surplus. Therefore, it is necessary to combine the surplus data from the test with the factory's fault identification requirements for power tools, and to propose an automated fault identification model through data analysis to meet the fault identification needs of automated testing platforms in the industrial power tool field.
[0003] Patent CN105004497A discloses a method for identifying symptoms of power tool malfunctions. This invention diagnoses malfunctions by comparing noise signals collected during a power tool malfunction with the noise level. It features low cost and high stability. However, this invention only details the steps of malfunction diagnosis from the perspective of noise characteristics and does not elaborate on specific malfunction diagnosis measures from other perspectives. Patent CN108921303A discloses a method for malfunction diagnosis and predictive maintenance of industrial electric motors. This invention detects and predicts motor malfunctions by combining data collected from multiple sensors with a BP neural network model. It features low cost and predictive capabilities. However, this invention is limited to detecting malfunctions in the mechanical components of the electric motor itself and does not further relate it to the specific circumstances of the power tool in which the electric motor operates. Summary of the Invention
[0004] To overcome the shortcomings of the above-mentioned technologies, this invention patent, taking into account the data values such as motor current and voltage, and combining the characteristics of electric nail gun fault conditions, introduces an energy consumption perspective to analyze the characteristics of different fault types in the time and frequency domains, and establishes a fault identification model by combining a support vector machine algorithm, thus proposing an electric nail gun fault category identification method that is efficient and accurate.
[0005] To achieve the above-mentioned objectives, this invention adopts the following solution:
[0006] A data-driven method for identifying fault types in electric nail guns, the method being as follows:
[0007] Step 1: Analyze and organize the different types of nail gun failures and their causes, and theoretically predict the trend of the impact of failures on motor current and voltage.
[0008] Step 2: Collect and record the data generated by the nail gun during operation through current and voltage sensors, collect current and voltage data values under different working conditions and calculate the corresponding energy consumption values, and manually classify the different data under normal working conditions and fault working conditions. Normal working conditions refer to the working environment in which the nail gun is working, and fault working conditions refer to the working environment in which the nail gun cannot continue to work, such as broken needles, stuck nails, etc.
[0009] Step 3: Extract the features of current, voltage, and energy consumption values in the time domain under fault conditions and normal conditions, and classify the fault type identification methods based on the inconsistency of the feature patterns shown by different fault types in the time domain.
[0010] Step 4: Convert the digital signal acquired in the time domain to the frequency domain, extract the features of current, voltage and energy consumption in the frequency domain, and combine the time domain features obtained in Step 3 with the frequency domain features obtained in the current step to construct an initial feature vector;
[0011] Step 5: Use the random forest algorithm to reduce the dimensionality of the initial feature vector;
[0012] Step 6: Input the feature vector processed in Step 5 into a support vector machine to diagnose the fault and optimize the parameters, and finally obtain the fault identification model, thereby completing the identification of common fault types of nail guns.
[0013] Furthermore, step 1 is detailed as follows:
[0014] Based on common fault records encountered during manual nail gun testing, different nail gun faults are categorized according to the area where the fault occurs, including broken nails, stuck nails, worn spring washers, spring failures, and firing pin failures. Among them, broken nails refer to nails breaking inside the nail gun, while stuck nails refer to nails being stuck inside the nail gun, which can cause the motor to stall, resulting in significant changes in current. Worn spring washers, spring failures, and firing pin failures can affect the motor load, causing varying degrees of changes in current and voltage depending on the severity of the fault.
[0015] Furthermore, step 2 is detailed as follows:
[0016] The automatic nailing platform was used to conduct several automatic nailing tests on a certain model of nail gun. The current and voltage values of the nail gun motor at different times under different working conditions were recorded by voltage and current sensors. The platform also marked the time information of nail gun failure detected by the platform. The energy consumption of the motor in a single ignition process was calculated manually under different working conditions, under normal conditions and at the time of failure. The results were classified according to the following: Working Condition 1: Normal working condition, Fault 1, Fault 2...; Working Condition 2: Normal working condition, Fault 1, Fault 2...
[0017] Furthermore, step 3 is detailed as follows:
[0018] Extract the time-domain characteristics of current, voltage, and energy consumption values under fault conditions and normal conditions, including mean, standard deviation, kurtosis, peak-to-peak value, skewness, maximum and minimum values, and determine whether at least one feature P contains a significant variation relationship. A significant variation relationship means that: under two different types of operating conditions, the value of feature P collected at the same time differs greatly in magnitude; or under one type of operating condition, the value of feature P changes linearly over continuous time, while under another type of operating condition, it changes nonlinearly; or under one type of operating condition, the value of feature P fluctuates little over continuous time, while under another type of operating condition, the value of feature P fluctuates greatly.
[0019] Fault types with characteristic P are called Class A faults, and fault identification is performed using only time-domain features. Fault types without characteristic P are called Class B faults, and the next step is required.
[0020] Furthermore, step 4 is detailed as follows:
[0021] For Class B faults and normal operating conditions, the digital signals acquired in the time domain are converted to the frequency domain, and the features of current, voltage, and energy consumption on the frequency domain graph are extracted, including centroid frequency, mean square frequency, root mean square frequency, frequency variance, and frequency standard deviation. The time domain features obtained in step 3 are combined with the frequency domain features obtained in the current step to construct an initial feature vector set.
[0022] Furthermore, step 5 is detailed as follows:
[0023] Step 5.1, set the initial feature vector set The feature labels and corresponding data values of each feature vector in different dimensions are used as dataset X. The fault conditions corresponding to each feature vector are assigned values of 0 and 1 according to whether they belong to a fault condition, where 0 represents normal and 1 represents fault. A dataset y is also created. For dataset X, different fault types of type B faults can be further subdivided into multiple subsets X1, X2, X3...Xn. The data under normal operating conditions is divided into subset X0, and each subset Xn contains multiple data points. The feature vectors in the dataset have different discriminative power depending on the corresponding working conditions. The specific number of subsets is determined by the number of types of B faults. The corresponding dataset y is also divided into multiple subsets y0, y1, y2, y3...yn. Each subset yn consists of multiple vectors with values of 0 and 1.
[0024] Step 5.2: Use the splitting function to split the dataset X and y, using 75% of the data as the training set and 25% of the data as the test set;
[0025] Step 5.3: Use the training set data to model a random forest. Since the training set is divided into multiple sub-training sets, the model also establishes multiple sub-models accordingly. Each sub-model is trained by a dataset Xn and its corresponding yn dataset.
[0026] Step 5.4: Construct importance indices for variables and calculate the cumulative mean and standard deviation of the decrease in heterogeneity of different feature labels in each tree.
[0027] Step 5.5: Visualize the importance level and use the average Gini coefficient obtained from the decision tree to quantify the importance of the feature. The higher the average Gini coefficient, the more important the feature.
[0028] Step 5.6: For each subset of data points segmented for each type B fault, select the top three most important variables to form a new feature vector. Integrate all new feature vectors according to different fault types to obtain the dimensionality-reduced feature vector set. Output.
[0029] Furthermore, step 6 is detailed as follows:
[0030] Will The feature vectors are fed into a support vector machine (SVM). The radial basis function (RBF) kernel is selected as the kernel function of the SVM. The kernel parameters and regularization parameters of the SVM are optimized by combining intelligent optimization algorithms, and finally the accurate diagnosis of type B faults is achieved. The diagnostic accuracy of the test set under the three perspectives of current, voltage and energy consumption is observed. The angle corresponding to the optimal result is selected as the identification angle of this type of fault, thereby establishing a fault identification model based on SVM.
[0031] The beneficial effects of this invention are as follows:
[0032] 1) This invention takes into account the actual working conditions of electric nail guns and introduces energy consumption analysis for the first time. It combines motor current and voltage to analyze the different characteristics of electric nail guns under different faults from multiple perspectives, and proposes a specific and reliable automatic identification method for electric nail gun fault types. This improves the automation level of the nail gun testing platform and reduces the manual cost of nail gun nailing tests.
[0033] 2) This invention classifies the difficulty of identifying different types of nail gun faults. Fault types with significant changes in feature values between fault conditions and normal conditions in the time domain are identified in the time domain, while those with insignificant changes are identified by using FFT for spectral analysis and combined with the support vector machine algorithm. This can efficiently and accurately identify different fault types. Attached Figure Description
[0034] Figure 1 This is a schematic diagram of the overall process of the method of the present invention;
[0035] Figure 2 yes Figure 1 A flowchart illustrating a specific embodiment;
[0036] Figure 3 This is a flowchart illustrating the dimensionality reduction process of the Random Forest algorithm. Detailed Implementation
[0037] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0038] Regarding the appendix Figure 1 , 2 The specific description is as follows:
[0039] Step 1: Based on the fault records commonly encountered in manual nail gun testing, classify different nail gun faults according to the area where the fault occurs. These include broken nails, stuck nails, worn spring washers, spring failures, and firing pin failures. Among them, broken nails refer to nails breaking inside the nail gun, and stuck nails refer to nails being stuck inside the nail gun. Theoretically, this will cause the motor to stall, resulting in a significant change in current. Worn spring washers, spring failures, and firing pin failures will theoretically affect the motor load, causing different degrees of change in current and voltage depending on the severity of the fault.
[0040] Step 2: Perform several automatic nailing tests on a certain model of nail gun using an automatic nailing platform. Record the current and voltage values of the nail gun motor at different times under different working conditions using voltage and current sensors. Mark the time information of nail gun failure detected by the platform. Manually calculate the energy consumption value of the motor in a single firing process under different working conditions, under normal conditions and at the time of failure. Classify the results according to the following format: "Working Condition 1: Normal, Fault 1, Fault 2...; Working Condition 2: Normal, Fault 1, Fault 2...".
[0041] Step 3: Extract the time-domain features of current, voltage, and energy consumption values under fault conditions and normal conditions, including mean, standard deviation, kurtosis, peak-to-peak value, skewness, maximum and minimum values, and determine whether there is at least one feature P that contains a significant change relationship. For fault types with feature P (referred to as Class A faults), only time-domain features are used for fault identification. For fault types without feature P (referred to as Class B faults), proceed to the next step.
[0042] Step 4: For Class B faults and normal operating conditions, perform frequency domain conversion on the digital signals acquired in the time domain, and extract the features of current, voltage, and energy consumption on the frequency domain graph, including centroid frequency, mean square frequency, root mean square frequency, frequency variance, and frequency standard deviation. Combine the time domain features obtained in Step 3 with the frequency domain features obtained in the current step to construct an initial feature vector set.
[0043] Step 5, due to the initial feature vector set The high dimensionality of the feature vectors makes the calculation process complex and time-consuming. Therefore, the random forest algorithm is used to process the feature vector set. Dimensionality reduction is performed to obtain the dimensionality-reduced feature vector set.
[0044] Step 6, The feature vectors are fed into a Support Vector Machine (SVM). A radial basis function kernel is selected as the SVM kernel function. Intelligent optimization algorithms (such as Particle Swarm Optimization (PSO) and Genetic Algorithm (GA)) are used to optimize the kernel and regularization parameters of the SVM, ultimately achieving accurate diagnosis of Class B faults. The diagnostic accuracy of the test set is observed from three perspectives: current, voltage, and energy consumption. The perspective corresponding to the optimal result is selected as the identification perspective for this type of fault, thus establishing an SVM-based fault identification model.
[0045] Regarding the appendix Figure 3 The specific description is as follows:
[0046] Step 1, set the initial feature vector set The feature labels (e.g., mean, standard deviation, centroid frequency, etc.) of each feature vector and their corresponding data values are used as dataset X. The fault conditions corresponding to each feature vector are assigned values of 0 and 1 (0 for normal, 1 for fault) according to whether they belong to a faulty operating condition, and a dataset y is created. For dataset X, different fault types of type B faults can be further subdivided into multiple subsets such as X1, X2, X3, etc. The data under normal operating conditions is divided into a subset X0, and each subset Xn contains multiple data points. The feature vectors in the dataset have different discriminative properties, which are mainly reflected in the different working conditions. The specific number of subsets is determined by the number of types of B faults. The corresponding dataset y is also divided into multiple subsets such as y0, y1, y2, and y3. Each subset yn consists of multiple vectors with values of 0 and 1.
[0047] Step 2: Use a splitting function to split the dataset X and y, using 75% of the data as the training set and 25% as the test set;
[0048] Step 3: Use the training set data to model a random forest. Since the training set is divided into multiple sub-training sets, the model also establishes multiple sub-models accordingly. Each sub-model is trained by a dataset Xn and its corresponding yn dataset.
[0049] Step 4: Construct importance indices for variables and calculate the cumulative mean and standard deviation of the decrease in heterogeneity of different feature labels in each tree;
[0050] Step 5: Visualize the importance level by using the average "impurity" (Gini coefficient) obtained from the decision tree to quantify the importance of the feature. The higher the average "impurity", the more important the feature.
[0051] Step 6: For each subset of data points segmented from each type B fault, select the top three most important variables to form a new feature vector. Integrate all new feature vectors according to different fault types to obtain the dimensionality-reduced feature vector set. Output.
[0052] The above embodiments are merely preferred embodiments of the present invention and are not intended to limit the technical solutions of the present invention. Any technical solution that can be implemented based on the above embodiments without creative effort should be considered to fall within the scope of protection of the patent of the present invention.
Claims
1. A data-driven method for identifying fault types in electric nail guns, characterized in that, Includes the following steps: Step 1: Analyze and organize the different types of nail gun failures and their causes, and theoretically predict the trend of the impact of failures on motor current and voltage. Step 2: Collect and record the data generated by the nail gun during operation through current and voltage sensors, collect current and voltage data values under different working conditions and calculate the corresponding energy consumption values, and manually classify the different data under normal working conditions and fault working conditions. Normal working conditions refer to the working environment in which the nail gun is working, and fault working conditions refer to the working environment in which the nail gun cannot continue to work. Step 3: Extract the features of current, voltage, and energy consumption values in the time domain under fault conditions and normal conditions, and classify the fault type identification methods based on the inconsistency of the feature patterns shown by different fault types in the time domain. Step 3 is as follows: Extract the time-domain characteristics of current, voltage, and energy consumption values under fault conditions and normal conditions, including mean, standard deviation, kurtosis, peak-to-peak value, skewness, maximum and minimum values. Determine whether at least one feature P contains a significant relationship of change. A significant relationship of change means that: under fault conditions and normal conditions, the value of feature P collected at the same time differs; or under one type of condition, the value of feature P changes linearly over continuous time, while under another type of condition, it changes nonlinearly; or under two different types of conditions, the magnitude of the fluctuation of feature P over continuous time differs. Fault types with feature P are called Class A faults, and fault identification is performed using only time-domain features. Fault types without feature P are called Class B faults, and the next step is required. Step 4: Convert the digital signal acquired in the time domain to the frequency domain, extract the features of current, voltage, and energy consumption in the frequency domain, and combine the time domain features obtained in Step 3 with the frequency domain features obtained in the current step to construct an initial feature vector; Step 4 is as follows: For Class B faults and normal operating conditions, the digital signals acquired in the time domain are converted to the frequency domain, and the features of current, voltage, and energy consumption on the frequency domain graph are extracted, including centroid frequency, mean square frequency, root mean square frequency, frequency variance, and frequency standard deviation. The time domain features obtained in step 3 are combined with the frequency domain features obtained in the current step to construct an initial feature vector set. ; Step 5: Use the random forest algorithm to reduce the dimensionality of the initial feature vector; Step 5 is described in detail below: Step 5.1, set the initial feature vector set The feature labels and corresponding data values of each feature vector in different dimensions are used as dataset X. The fault conditions corresponding to each feature vector are assigned values of 0 and 1 according to whether they belong to a fault condition, where 0 represents normal and 1 represents fault. A dataset y is also created. For dataset X, different fault types of type B faults can be further subdivided into multiple subsets X1, X2, X3...Xn. The data under normal operating conditions is divided into subset X0, and each subset Xn contains multiple data points. The feature vectors in the dataset have discriminative power based on the different operating conditions. The specific number of subsets is determined by the number of types of B faults, and the corresponding dataset y is also divided into multiple subsets y0, y1, y2, y3...yn. Each subset yn consists of multiple vectors with values of 0 and 1. Step 5.2: Use a splitting function to split the dataset X and y, using 75% of the data as the training set and 25% as the test set; Step 5.3: Use the training set data to model a random forest. Since the training set is divided into multiple sub-training sets, the model also establishes multiple sub-models accordingly. Each sub-model is trained using a dataset Xn and its corresponding yn dataset. Step 5.4: Construct importance indices for variables and calculate the cumulative mean and standard deviation of the decrease in heterogeneity for different feature labels across all trees; Step 5.5 visualizes the importance level by using the average Gini coefficient obtained from the decision tree to quantify the importance of the feature; the higher the average Gini coefficient, the more important the feature. Step 5.6: For each subset of data points segmented for each type B fault, select the top three most important variables to form a new feature vector. Integrate all new feature vectors according to different fault types to obtain the dimensionality-reduced feature vector set. Output; Step 6: Input the feature vector processed in Step 5 into a support vector machine to diagnose the fault and optimize the parameters, and finally obtain the fault identification model, thereby completing the identification of common fault types of nail guns.
2. The data-driven electric nail gun fault type identification method according to claim 1, characterized in that, Step 1 is described in detail as follows: Based on common fault records encountered during manual nail gun testing, different nail gun faults are categorized according to the area where the fault occurs, including broken nails, stuck nails, worn spring washers, spring failures, and firing pin failures. Among them, broken nails refer to nails breaking inside the nail gun, while stuck nails refer to nails being stuck inside the nail gun, which can cause the motor to stall, resulting in significant changes in current. Worn spring washers, spring failures, and firing pin failures can affect the motor load, causing varying degrees of changes in current and voltage depending on the severity of the fault.
3. The data-driven electric nail gun fault type identification method according to claim 1, characterized in that, Step 2 is described in detail below: The automatic nailing platform was used to conduct several automatic nailing tests on a certain model of nail gun. The current and voltage values of the nail gun motor at different times under different working conditions were recorded by voltage and current sensors. The platform also marked the time information of nail gun failure detected by the platform. The energy consumption of the motor in a single ignition process was calculated manually under different working conditions, under normal conditions and at the time of failure. The results were classified according to the following: Working Condition 1: Normal working condition, Fault 1, Fault 2...; Working Condition 2: Normal working condition, Fault 1, Fault 2...
4. The data-driven electric nail gun fault type identification method according to claim 1, characterized in that, Step 6 is as follows: Will The feature vectors are fed into a Support Vector Machine (SVM). The radial basis function (RBF) kernel is selected as the kernel function of the SVM. The kernel parameters and regularization parameters of the SVM are optimized by combining intelligent optimization algorithms, and finally the accurate diagnosis of Class B faults is achieved. The diagnostic accuracy of the test set under the three angles of current, voltage and energy consumption is observed. The angle corresponding to the optimal result is selected as the identification angle of this type of fault, thereby establishing a fault identification model based on SVM.