A welding and cutting airflow sensor anomaly detection method based on mutual information feature construction
Through a method based on mutual information feature construction, the current and air flow rate data during the welding and cutting process are collected in real time and the machine learning model is trained, which solves the problem of traditional detection methods being insensitive to abnormal detection of air flow sensors and achieves high accuracy and sensitivity. Abnormal detection ensures the stability and safety of the welding and cutting process.
Patent Information
- Application Number
- CN202410796966.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2044-06-20
AI Technical Summary
During the welding and cutting process, the traditional air flow sensor anomaly detection method has the problem that the threshold judgment method is insensitive to small changes in performance and the periodicity of manual inspection is insufficient, resulting in threats to the quality of welding and cutting.
Using a method based on mutual information feature construction, real-time detection of airflow sensor anomalies is achieved by collecting current and airflow velocity data in real time, building a sample data set, obtaining a feature data set, and training a machine learning classification algorithm model.
It improves the accuracy and sensitivity of abnormality detection, enables timely warning to prevent abnormal deterioration, ensures the stability and safety of the welding and cutting process, reduces the frequency and cost of manual inspections, and improves operational efficiency.
Smart Images

Figure CN118376808B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of intelligent welding and cutting, and in particular relates to a welding and cutting airflow sensor anomaly detection method based on mutual information feature construction. Background Art
[0002] In the welding process, airflow sensors play a key role in this process. Their real-time and accurate monitoring of the protective gas flow is essential to ensure the safety and stability of the welding process. However, due to the complexity of the working environment and the aging and wear of the sensor itself, welding and cutting airflow sensors may become abnormal, resulting in inaccurate readings or even complete failure, which in turn poses a serious threat to the quality of welding and cutting.
[0003] Traditional welding and cutting airflow sensor anomaly detection methods mostly rely on simple threshold judgment or regular manual inspection. Although these methods are simple and easy to use, they have many limitations. For example, the threshold judgment method is insensitive to small changes in sensor performance and can only be detected when the sensor has obvious faults, which may have adversely affected the welding process. Manual inspection is limited by the inspection cycle and the professional level of personnel, making it difficult to detect all potential problems in a timely and accurate manner.
[0004] In recent years, with the rapid development of data analysis and machine learning technology, data-driven anomaly detection methods have gradually become a research hotspot. Among them, mutual information, as an effective indicator for measuring the correlation between variables, has been widely used in fields such as feature selection and anomaly detection. Mutual information can not only capture the linear and nonlinear relationships between variables, but also quantify the amount of information obtained from one variable about another variable. Therefore, it has significant advantages in dealing with complex and nonlinear data relationships. Summary of the invention
[0005] Purpose of the invention: In view of the problems existing in the above-mentioned background technology, the present invention provides a welding and cutting airflow sensor anomaly detection method based on mutual information feature construction. By utilizing the mutual information feature construction method, the intrinsic connection and dependency relationship between sensor data can be deeply explored, so as to more accurately identify the abnormal state of the sensor.
[0006] Technical solution: A welding and cutting airflow sensor anomaly detection method based on mutual information feature construction, comprising the following steps:
[0007] Step S1, collecting high-frequency current time series data and gas flow rate time series data in real time based on the current sensor and the airflow sensor to construct a sample data set;
[0008] Step S2: construct features for the divided sample data set to obtain a feature data set; the feature data set specifically includes:
[0009] (1) Maximum, minimum, mean, variance of the current, and the mean of the current greater than the preset threshold th1;
[0010] (2) Maximum, minimum, mean, variance of gas flow rate, and mean of gas flow rate when current is greater than th1;
[0011] (3) The number of current points greater than th1 and the proportion of current points less than th1;
[0012] (4) The number of points where the gas flow rate exceeds the preset threshold th2;
[0013] (5) Mutual information value between corresponding current and gas flow rate;
[0014] Step S3, selecting a machine learning classification algorithm and performing model training based on a feature data set to obtain a welding and cutting airflow sensor anomaly detection model;
[0015] Step S4: deploy the trained machine learning classification algorithm model on the edge side, collect high-frequency time series current and gas flow rate data during the welding and cutting process in real time, and perform real-time detection of airflow sensor abnormalities.
[0016] Furthermore, the specific method of constructing the sample data set in step S1 includes:
[0017] Step S1.2, construct a sample data set based on a sliding window sampling method to obtain a sample data set; set the sliding window length to s; annotate the samples based on the real-time status of the airflow sensor, where the sensor is marked as 0 when it is normal and 1 when it is abnormal, and label each sample;
[0018] Step S1.2: Randomly shuffle the sample data set and divide the sample data set into a training set, a validation set, and a test set in proportion.
[0019] Furthermore, the specific calculation method of the mutual information value between the corresponding current and the gas flow rate value in step S2 includes:
[0020]
[0021] Where X and Y represent two random variables, representing the current value and the protective gas flow velocity value respectively; represents the mutual information value of variables X and Y; P(x,y) represents the joint probability density function of X and Y, and P(x) and P(y) represent the marginal probability density functions of X and Y respectively.
[0022] Furthermore, in step S3, one or more algorithms selected from XGboost, lightGBM, random forest, support vector machine, and naive Bayes algorithm models are integrated to perform model training.
[0023] Furthermore, the machine learning classification algorithm model is trained based on the feature data set of the training set, and the model is verified through the validation set to prevent possible overfitting, and finally the model output effect is tested through the test set.
[0024] Compared with the prior art solutions, the technical solution adopted by the present invention has the following beneficial effects:
[0025] (1) The airflow sensor anomaly detection model constructed by using the mutual information feature construction method can deeply explore the intrinsic connection and correlation between the various sensor data in the cutting process. Compared with traditional threshold judgment or simple statistical methods, the feature construction based on mutual information can more accurately reflect the actual working state of the sensor, thereby effectively improving the accuracy of anomaly detection. Since mutual information can capture the nonlinear and complex relationships between data, this method shows stronger adaptability when dealing with changeable and complex working environments. Regardless of how the sensor data changes, this method can effectively construct features and perform anomaly detection.
[0026] (2) The anomaly detection method provided by the present invention is highly sensitive to small changes in the performance of the airflow sensor, and can issue an early warning when the anomaly just occurs, preventing the abnormal situation from further deteriorating, thereby ensuring the stability and safety of the gas cutting process. At the same time, through real-time monitoring and anomaly detection, potential problems can be discovered and handled in a timely manner, reducing the frequency and cost of manual inspections and improving operational efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 A flow chart of a welding and cutting airflow sensor anomaly detection method based on mutual information feature construction provided by the present invention;
[0028] Figure 2 A schematic diagram of a sample data set provided by the present invention;
[0029] Figure 3 A schematic diagram of a feature data set provided by the present invention;
[0030] Figure 4 This is a diagram of the model training results in an embodiment of the present invention. DETAILED DESCRIPTION
[0031] The present invention provides a method for detecting abnormalities of airflow sensors during welding and cutting. Through a machine learning classification algorithm, various abnormalities that may exist in the airflow sensor are learned and a detection model is trained. The logical relationship between the welding current and the shielding gas flow rate in the actual welding and cutting process is used for feature construction to obtain a feature data set that is more accurate for detecting and identifying abnormalities of the airflow sensor. The above data set is input into the machine learning classification algorithm model training to obtain a more accurate airflow sensor abnormality detection model.
[0032] The present invention will be further explained below in conjunction with the accompanying drawings.
[0033] like Figure 1 As shown, the present invention provides a welding and cutting airflow sensor abnormality detection method based on mutual information feature construction, comprising the following steps:
[0034] Step S1: collecting high-frequency current time series data and gas flow rate time series data in real time based on an external current sensor and an airflow sensor, and constructing a sample data set based on the time series data.
[0035] This embodiment provides an airflow sensor abnormality processing method based on time series data. First, the current data and shielding gas flow rate data in the actual welding and cutting process are collected, and a sample data set is constructed based on this. In the actual welding and cutting process, the abnormality of the airflow sensor cannot be completely and accurately determined only by the shielding gas flow rate data. For example, when there is an effective welding current during welding and cutting, but the airflow sensor has no valid reading, it is impossible to determine whether there is a sensor abnormality based on the airflow sensor alone. Therefore, this embodiment selects welding current and airflow sensor as the basis for constructing the sample data set for subsequent airflow sensor abnormality detection.
[0036] The sample data set is constructed based on the sliding window sampling method to obtain the sample data set; the sliding window length is set to s. The samples are annotated based on the real-time status of the airflow sensor, where the sensor is marked as 0 when it is normal and 1 when it is abnormal, and each sample is labeled. Figure 2 shown.
[0037] The sample data set is randomly shuffled and divided into a training set, a validation set and a test set in proportion.
[0038] Step S2: construct features for the divided sample data set to obtain a feature data set.
[0039] The feature dataset constructed in this embodiment includes the following features:
[0040] (1) Maximum, minimum, mean, variance of the current, and the mean of the current greater than the preset threshold th1;
[0041] In this embodiment, th1=10A.
[0042] (2) Maximum, minimum, mean, variance of gas flow rate, and mean of gas flow rate when current is greater than th1;
[0043] (3) The number of current points greater than th1 and the proportion of current points less than th1;
[0044] (4) The number of points where the gas flow rate exceeds the preset threshold th2; in this embodiment, th2 = 2 L / min
[0045] (5) Corresponding mutual information value between current and gas flow rate values.
[0046] Based on the above construction method, the feature data set of each sample is calculated and obtained. The specific results are as follows: Figure 3 shown.
[0047] The features selected in this embodiment include not only statistical features such as maximum value, minimum value, mean, and variance, but also features closely related to welding and cutting conditions, such as the mean of effective current, the corresponding airflow mean, the number of effective current points, the number of effective airflow points, and the duty cycle. Since the current and gas flow rate are closely related in the welding and cutting process, in the normal welding and cutting process, when current is generated, there should be a corresponding flow of protective gas to protect the welding and cutting process. Therefore, in this embodiment, the mutual information value is set to measure the mutual dependence of the two random variables. When the two variables are independent of each other, their mutual information is zero. If one variable contains information about another variable, the mutual information will be a positive value. The mutual information can fully reflect the working status of the airflow sensor. When the sensor is abnormal, its characteristic vector will also change accordingly. By comparing it with the characteristic vector under normal conditions, the abnormality can be discovered and located in time. The specific calculation method is as follows:
[0048]
[0049] Wherein X and Y represent two random variables, which respectively represent the current value and the protective gas flow velocity value in this embodiment. represents the mutual information value of variables X and Y; P(x,y) represents the joint probability density function of X and Y, and P(x) and P(y) represent the marginal probability density functions of X and Y respectively.
[0050] Step S3: Select a machine learning classification algorithm to perform model training and obtain a welding and cutting airflow sensor anomaly detection model.
[0051] Based on the feature data set obtained in step S2, a machine learning classification algorithm is selected for model training. In this embodiment, the machine learning classification algorithm selected is XGboost. In practical applications, one or more algorithms in common algorithm models such as XGboost, lightGBM, random forest, support vector machine, and naive Bayes can be used for model training.
[0052] The XGboost model is trained based on the feature data set of the training set, and the model is verified through the validation set to prevent possible overfitting. Finally, the model output effect is tested through the test set.
[0053] Step S4: deploy the trained machine learning classification algorithm model on the edge side to collect high-frequency time series current and gas flow rate data in the welding process in real time, and detect air flow sensor anomalies in real time. Figure 4 The figure shows the confusion matrix obtained in this embodiment. It can be clearly seen that the model provided by the present invention can achieve high-precision detection of airflow sensor abnormalities.
[0054] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A welding and cutting airflow sensor anomaly detection method based on mutual information feature construction, characterized in that: include: Step S1: collect high-frequency current time series data and gas flow rate time series data in real time based on current sensors and airflow sensors to construct a sample data set; specifically, Step S1.2, construct a sample data set based on a sliding window sampling method to obtain a sample data set; set the sliding window length to s; annotate the samples based on the real-time status of the airflow sensor, where the sensor is marked as 0 when it is normal and 1 when it is abnormal, and label each sample; Step S1.2, randomly shuffling the sample data set, and dividing the sample data set into a training set, a validation set, and a test set in proportion; Step S2: constructing features for the divided sample data set to obtain a feature data set; The feature data set specifically includes: (1) Maximum, minimum, mean, variance of the current, and the mean of the current greater than the preset threshold th1; (2) Maximum, minimum, mean, variance of gas flow rate, and mean of gas flow rate when current is greater than th1; (3) The number of current points greater than th1 and the proportion of current points less than th1; (4) The number of points where the gas flow rate exceeds the preset threshold th2; (5) Mutual information value between corresponding current and gas flow rate; The specific calculation method of the mutual information value between the corresponding current and the gas flow rate value includes: ; Where X and Y represent two random variables, representing the current value and the protective gas flow rate value respectively; represents the mutual information value of variables X and Y; P(x,y) represents the joint probability density function of X and Y, and P(x) and P(y) represent the marginal probability density functions of X and Y respectively; Step S3, selecting a machine learning classification algorithm and performing model training based on a feature data set to obtain a welding and cutting airflow sensor anomaly detection model; Step S4: deploy the trained machine learning classification algorithm model on the edge side, collect high-frequency time series current and gas flow rate data during the welding and cutting process in real time, and perform real-time detection of airflow sensor abnormalities.
2. The welding and cutting airflow sensor abnormality detection method based on mutual information feature construction according to claim 1 is characterized in that: In the step S3, one or more algorithms selected from XGboost, lightGBM, random forest, support vector machine, and naive Bayes algorithm models are integrated to perform model training.
3. The welding and cutting airflow sensor abnormality detection method based on mutual information feature construction according to claim 2 is characterized in that: The machine learning classification algorithm model is trained based on the feature data set of the training set, and the model is verified through the validation set to prevent possible overfitting. Finally, the model output effect is tested through the test set.
