CN118965216B - Welding implicit anomaly detection and identification method based on multi-source data - Google Patents

Welding implicit anomaly detection and identification method based on multi-source data

Info

Publication number
CN118965216B
CN118965216B CN202410960492.2A CN202410960492A CN118965216B CN 118965216 B CN118965216 B CN 118965216B CN 202410960492 A CN202410960492 A CN 202410960492A CN 118965216 B CN118965216 B CN 118965216B
Authority
CN
China
Prior art keywords
data
welding
abnormal
point
smoothing factor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410960492.2A
Other languages
Chinese (zh)
Other versions
CN118965216A (en
Inventor
孙昊
张发平
魏剑峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Institute of Technology BIT
Original Assignee
Beijing Institute of Technology BIT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Institute of Technology BIT filed Critical Beijing Institute of Technology BIT
Priority to CN202410960492.2A priority Critical patent/CN118965216B/en
Publication of CN118965216A publication Critical patent/CN118965216A/en
Application granted granted Critical
Publication of CN118965216B publication Critical patent/CN118965216B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/243Classification techniques relating to the number of classes
    • G06F18/2433Single-class perspective, e.g. one-against-all classification; Novelty detection; Outlier detection
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • G06F18/253Fusion techniques of extracted features
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • G06F18/254Fusion techniques of classification results, e.g. of results related to same input data
    • G06F18/256Fusion techniques of classification results, e.g. of results related to same input data of results relating to different input data, e.g. multimodal recognition
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/80Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level
    • G06V10/809Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level of classification results, e.g. where the classifiers operate on the same input data
    • G06V10/811Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level of classification results, e.g. where the classifiers operate on the same input data the classifiers operating on different input data, e.g. multi-modal recognition
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Multimedia (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Medical Informatics (AREA)
  • General Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Investigating Or Analyzing Materials By The Use Of Ultrasonic Waves (AREA)

Abstract

The invention discloses a welding implicit abnormality detection and identification method based on multi-source data, and belongs to the field of welding quality detection. The realization method of the invention is that the multi-mode data information of the welding quality of each object is collected in real time, including sound, current, voltage, spectrum, temperature information and image information. And acquiring each information source by adopting a corresponding sensor, and extracting the characteristics of each information source. And carrying out normalization processing on the extracted characteristic values, and carrying out dimension reduction on the data based on the abnormal categories by adopting an LDA method. Abnormal points are detected by using a local outlier LOF method. The isolated forest is utilized to identify abnormal points on the whole, the detection area is divided, and a new neighborhood search space is defined in the divided area. And identifying abnormal types by adopting a probability neural network PNN method. Optimizing the smoothing factor of the PNN by using an artificial bee colony algorithm ABC, obtaining the optimal smoothing factor, establishing an optimal PNN model, and realizing welding implicit anomaly detection and identification according to the optimal PNN network optimization model.

Description

Welding implicit anomaly detection and identification method based on multi-source data
Technical Field
The invention relates to a welding implicit abnormality detection and identification method based on multi-source data, and belongs to the field of welding quality detection.
Background
Soldering is a common metal joining process that involves joining metal pieces by heating and melting the metal material and adding a suitable filler material. Welding is widely used in the fields of manufacturing, construction, automobile manufacturing, aerospace and the like. The welding process is important to ensure the quality and reliability of the weld. Popular weld quality tests typically employ single weld quality information, such as weld image information using convolutional neural networks, weld sound information using sound sensors, and also weld quality detection methods based on pulsed infrared thermal imaging techniques. In the present day, the advanced welding quality detection method is mainly single image information detection, and the welding quality detection method is continuously optimized through the improvement of a corresponding image extraction algorithm and extraction characteristics. The welding quality detection method with single image information is an effective method because the quality of welding is mainly dependent on the size and shape of the weld. Although the welding quality detection method based on the image information has good detection effect, the image information only can reflect the welding quality problems of some surfaces, and some implicit welding quality problems cannot be detected. Thus, a welding quality detection method based on multiple data sources is adopted. Because different information can reflect the influence of different factors in the welding process, the information such as graph, sound, current, voltage, spectrum, temperature and the like is adopted, the abnormality of the welding process, especially the information such as sound, current and the like can be more comprehensively reflected, the implicit abnormality of welding can be detected, and the welding abnormality detection effect is greatly improved.
Disclosure of Invention
To solve the problem of difficult discovery of implicit abnormality of welding quality. The invention aims to provide a welding implicit abnormality detection and identification method based on multi-source data, which adopts sound, current, voltage, spectrum and temperature information and combines image information, so that the implicit abnormality hidden under the surface can be detected while the surface welding abnormality can be detected. Firstly, each information source is collected by adopting a corresponding sensor, and the characteristics of each information source are extracted. And carrying out normalization processing on the extracted characteristic values, carrying out dimension reduction on the data based on the abnormal categories by adopting an LDA method, estimating the intrinsic dimension by adopting a statistical method, and enabling the dimension after dimension reduction to be equal to the intrinsic dimension. Abnormal points are detected using the method of local outlier factor LOF (Local Outlier Factor). The outliers are identified on the whole by utilizing isolated forest isolation, the detection area is segmented, a new neighborhood search space is defined in the segmentation area, the calculation time of LOF is obviously reduced, and the detection accuracy is improved. And finally, identifying the abnormal types by adopting a probabilistic neural network PNN (Probabilistic Neural Network) method. And optimizing the smoothing factor of the PNN by using an artificial bee colony algorithm ABC (Artificial Bee Colony Algorithm) to obtain an optimal smoothing factor, establishing an optimal PNN model, and realizing welding implicit anomaly detection and identification according to the optimal probabilistic neural network PNN network optimization model.
In order to achieve the above object, the present invention provides the following solutions:
the invention discloses a welding implicit abnormality detection and identification method based on multi-source data, which comprises the following steps:
The method comprises the steps of firstly, collecting multi-mode data information of welding quality of each object in real time for n identical welding objects, and storing the multi-mode data in a database, wherein the multi-mode data comprise a molten pool front image, temperature field information on two sides of the molten pool, current and voltage information during welding, sound information during welding and arc spectrum information during welding;
Extracting the size information of the molten pool and the gray value of the image from the front image of the molten pool, and extracting the mean value, the mean square value, the variance, the peak-to-peak value, the kurtosis coefficient and the skewness of corresponding signals from the temperature field information at two sides of the molten pool, the current and voltage information during welding, the sound information during welding and the arc spectrum information during welding;
The length, width, gray value information of the molten pool image is [ g 1,g2,g3 ], the mean value, mean square value, variance, peak-to-peak value, kurtosis coefficient and skewness information of the temperature is [ t 1,t2,t3,t4,t5,t6 ], the mean value, mean square value, variance, peak-to-peak value, kurtosis coefficient and skewness information of the current is [ c 1,c2,c3,c4,c5,c6 ], the mean value, mean square value, variance, peak-to-peak value, kurtosis coefficient and skewness information of the voltage is [ v 1,v2,v3,v4,v5,v6 ], the mean value, mean square value, variance, peak-to-peak value, kurtosis coefficient and skewness information of the sound is [ a 1,a2,a3,a4,a5,a6 ], the mean value, mean square value, variance, peak-to-peak value, kurtosis coefficient and skewness information of the spectrum is [ l 1,l2,l3,l4,l5,l6 ];
Each of the n welding objects has data x' i, denoted [gi,1,...,gi,3,ti,1,...,ti,6,Ci,1,...,ci,6,vi,1,...,vi,6,ai,1,...,ai,6,li,1,...,li,6]; where i e 1, n;
Step three, carrying out normalization processing on the multi-source data extracted in the step two, and then carrying out dimension reduction processing on the multi-source data by adopting an LDA method;
Step 3.1, converting each characteristic value into a range of [ -1,1], and carrying out normalization processing on each multi-source data x' i by the following formula:
Wherein max (x 'i,j) is the maximum value of the multi-source data x' i in the j-th dimension, min (x 'i,j) is the minimum value of the multi-source data x' i in the j-th dimension, i is [1, n ], each welding object is y i after normalization, and the welding object is expressed as
[Gi,1,...,Gi,3,Ti,1,...,Ti,6,Ci,1,...,Ci,6,Vi,1,...,Vi,6,Ai,1,...,Ai,6,Li,1,...,Li,6]; Wherein i is [1, n ];
step 3.2, n normalized data Y i form a matrix Y, and the matrix Y is subjected to eigenvector estimation;
step 3.2.1, let Y be
Obtaining the eigenvector of the matrix Y T Y
g,1,...,λg,3t,1,...,λt,6c,1,...,λc,6v,1,...,λv,6a,1,...,λa,6l,1,...,λl,6];
Step 3.2.2, generating a matrix X (b) of random data with the same number n and dimension of a group a and a Y matrix, wherein b E [1, a ], m is the dimension of X (b), which is the same as the dimension of X, and X (b) has the following matrix form;
Step 3.2.3, solving the eigenvector [ lambda (b) 1,λ(b)2,…,λ(b)m ] of the matrix X (b), further calculating the average value of all eigenvalues Wherein j is the data dimension, j is [1, m ], and the mean feature vector is [ lambda (B) 1,λ(B)2,…,λ(B)m ];
Step 3.2.4, comparing the eigenvectors of the matrix Y T Y and the eigenvalues in the mean eigenvector in the same dimension one by one, determining that the eigenvalue of the matrix Y T Y is larger than the number of the eigenvalues of the matrix X (b) T X (b), and marking as d, wherein the eigenvalue of the normalized data Y i is d;
3.3, performing dimension reduction treatment on the multi-source data by adopting an LDA dimension reduction method;
(1) The welding quality is divided into N classes, the number of welding objects is N, the j-th class set in the welding objects is Y j, and the intra-class divergence S w is calculated:
Wherein S wj represents the intra-class divergence of the j-th class, μ j represents the mean vector of the welding object y i of the j-th class, i ε [1, n ], j ε [1, N ];
(2) Calculating an inter-class divergence S b:
Wherein n j is the number of the j-th welding objects y i, and mu is the mean vector of the welding objects y i;
(3) The intra-class divergence S w and the inter-class divergence S b are adopted to obtain the following targets:
The matrix W is a matrix formed by tense eigenvectors corresponding to d largest eigenvalues, and the optimization objective function is further obtained by deduction:
D is the intrinsic dimension of the data, the data x i=WTyi is obtained by reducing the dimension of any one of the normalized data y i, i epsilon [1, n ] and n is the number of samples, and the data x i after the dimension reduction is represented as [ x i,1,xi,2,xi,3,...,xi,d ];
performing anomaly detection modeling on the multi-source data by adopting a local outlier factor algorithm LOF to obtain an anomaly detection model;
Step 4.1, adopting a method of an isolated forest, selecting a front c layer of the isolated forest to divide the data x i obtained after three n dimension reductions, i epsilon [1, n ] to obtain 2 c sample subsets;
Dividing the data set X into two parts X ' 1 and X ' 2,X′1 according to the value of X i,j, wherein the j dimension of the part X ' 2,X′1 is larger than the j dimension of the part X i,j,X′2 and smaller than or equal to X i,j;
Judging the distance between the new welding object point x n+1 and the division boundary x i,j, if x n+1 is close to the division boundary, namely min [ ther (x i,j)]<xn+1,j<max[ther(xi,j) ], changing the position of the division boundary, and making x i,j be ther (x i,j);
Wherein a i and b i are random two points of the sample subset that are separated by a distance k;
Step 4.2, selecting a neighborhood search space from 2 c sample subsets obtained in step 4.1 by adopting an isolated forest;
Calculating the average path length of each of the reduced dimension data x i The calculation formula is as follows:
N is the number of spanning trees in the isolated forest, p i,j is the path length of the ith reduced dimension x i in the jth tree, i E [1, N ];
determining a threshold p based on normal and abnormal data in the dimension reduction data x i when When the point is added into the neighborhood search space, the point in the sample subset search space is marked asThe number of the divided sample subsets, i.e. [1,2 c ];
step 4.3, calculating LOF value of the new welding object point x n+1;
Determining k-neighborhood of new welding object x n+1, determining sample subset of x n+1 as l, and recording points in the sample subset as
Wherein, the For a subset of samples, points inIs a mean path length of (a);
Then calculate all points in the new welding object x n+1 and sample subset Distance between
Wherein j isIn the first, j E [1, d ], distance points in the subsetIs the kth point of (2)The distance between them is recorded as
The k-neighborhood of point x n+1 is centered on point x n+1, the distance in the subset is less thanIf the k-neighborhood of point x n+1 is marked asThe number of points in the k-neighborhood of point x n+1 is noted asPoints in the k-neighborhood of point x n+1 The kth reachable distance to point x n+1 is:
the local reachable density of points x n+1 is calculated:
calculating local anomaly factors of the point x n+1:
Wherein the method comprises the steps of Points within k-neighborhood of x n+1 Is a local reachable density of (3);
Determining the range of local outlier factors of the point x n+1, and completing anomaly detection modeling of the multi-source data:
constructing a PNN network model of the probability neural network for welding implicit anomaly detection and identification, optimizing a smoothing factor sigma of the PNN by using an ABC algorithm to obtain a PNN network optimization model of the probability neural network, and realizing welding implicit anomaly detection and identification according to the PNN network optimization model of the probability neural network.
The PNN model is composed of an input layer, an implicit layer, a summation layer and an output layer;
Inputting the abnormal data point v i after the dimension reduction, wherein the abnormal data point v i is the abnormal point in the data point x i after the dimension reduction, d dimensions [ v i,1,vi,2,vi,3,…,vi,d ] are provided for each abnormal point v i, and the abnormal type in u is input to an input layer, i < n, calculating the hidden layer and a summation layer together by using a Parzen method, and calculating the j data points of the abnormal point v i and the h abnormal type And the hidden layer output of the same abnormal mode is weighted and summed, and the relational expression is as follows:
Where σ is the smoothing factor, d is the input vector dimension, v i is the input vector, The m is the number of data points v i of the j-th abnormal type;
The number of neurons of the output layer is the total abnormal category number, threshold identification is carried out on f h(vi), and neurons with the maximum posterior probability density are found out from all the neurons of the output layer;
y=argmax(fh(vi))
Step 5.2, optimizing the smoothing factor sigma of PNN by adopting artificial bee colony algorithm ABC, and identifying the abnormal cause of the abnormal result of the abnormal detection model in the step four by adopting an optimization model;
step 5.2.1, setting number of honey sources as o, number of leading bees as upper limit of honey source test times, determining value range of smoothing factor as [0,1], randomly generating initial smoothing factor, and making its expression be
Wherein sigma z is the z-th honey source, z is [1, o ], j is the dimension of sigma z, namely the j-th smoothing factor in PNN, and the number of j is the number of abnormal points v i; a random number from 0 to 1;
Step 5.2.2, using the correct number of classification of PNN as fitness function to evaluate the effect of the smoothing factor, wherein cor (sigma z)[argmax(f(vi)) ] represents the correct number of prediction results by using the smoothing factor sigma z for all abnormal data points v i;
step 5.2.3, leading the bee stage, searching a new smoothing factor sigma' i nearby the initial smoothing factor sigma z, wherein the formula is as follows;
σ′zj=max{0,min{vzj,1}}
Wherein the method comprises the steps of For random values of-1 to 1, σ kj is a random value in σ zj, comparing Cor (σ z)[argmax(f(xi)) ] with Cor (σ ' z)[argmax(f(xi)) ] which is the number of times the result is predicted correctly using the smoothing factor σ ' z, when Cor (σ z)[argmax(f(xi))]>cor(σ′z)[argmax(f(xi)) ] leaves Cor (σ z)[argmax(f(xi)) ] as a new smoothing factor, when Cor (σ z)[argmax(f(xi))]<Cor(σ′z)[argmax(f(xi)) ] leaves Cor (σ ' z)[argmax(f(xi)) ] as a new smoothing factor, when Cor (σ z)[argmax(f(xi))]=cor(σ′z)[argmax(f(xi)) ] leaves Cor (σ z)[argmax(f(xi)) ] as a new smoothing factor, and R (σ z) is the number of times the z-th honey source is updated, if σ z is transformed, R (σ z)=R(σz) +1;
step 5.2.4, following the bee stage, selecting a smoothing factor by adopting a roulette method:
Wherein, p z is the probability of selecting honey source sigma z, z epsilon [1, o ], follow bees select honey source sigma z from the optimal result of step 5.2.3 according to the probability, then find new smoothing factor sigma' i according to the method of step 5.2.3 near sigma z, leave the better smoothing factor marked sigma z;R(σz) as the number of times the z-th honey source is updated, if sigma z is transformed, R (sigma z)=R(σz) +1;
Step 5.2.5, in the stage of bee detection, searching the updated times R (sigma z) of each honey source, and updating the honey source by the following formula when the preset threshold is not updated, so as to search the global optimal solution;
According to the method of step 5.2.3, the cor (sigma z)[argmax(f(xi) of the optimal sigma z obtained by 5.2.4 is compared with the cor (sigma 'z)[argmax(f(xi) of the sigma' z obtained by 5.2.5 updating, the better smoothing factor is recorded as sigma z, and the steps 5.2.1-5.2.5 are repeated until the iteration times are reached, so that the optimized smoothing factor is obtained.
Step 5.3, adopting an optimization model to identify the abnormality cause of the abnormality result of the abnormality detection model in step four, adopting an optimized PNN model to input a new abnormal welding object v n+1 identified in step four, and calculating a new abnormal point v n+1 and a jth data point of an h abnormal type in data points v i of the abnormality after dimension reductionAnd the hidden layer output of the same abnormal mode is weighted and summed, and the relational expression is as follows:
Where σ is the smoothing factor, d is the input vector dimension, v n+1 is the new input vector, The h abnormal data points in the h abnormal class in the data points v i after the dimension reduction are j abnormal data points, h epsilon u, and m is the number of the j abnormal class data points v i;
F h(vn+1) is subjected to threshold identification, and a neuron with the maximum posterior probability density is found out from all output layer neurons, wherein the type represented by the neuron is the abnormal type of v n+1, namely welding implicit abnormal detection and identification are realized.
Advantageous effects
1. The current method for identifying welding abnormality by extracting welding image information by a single industrial camera has good effect on identifying welding appearance defects (such as weld flash, slag inclusion, welding deformation, surface air holes and surface cracks), but is not ideal for identifying welding defects such as hidden air holes, hidden cracks, cold welding, false welding and the like. The welding is a multi-factor influence coupling process, and the welding implicit abnormality detection and identification method based on the multi-source data can better represent the change of the welding state by adding data such as temperature, sound, spectrum, current and voltage data and the like and combining the visual information, and is beneficial to detecting and classifying more types of welding faults. The accuracy, the robustness and the interpretability of the welding anomaly classification model can be improved by comprehensively utilizing various data sources, so that the on-line detection and the anomaly classification of the welding quality are more comprehensive and accurate.
2. The welding process parameters are mutually coupled, so that the welding quality is difficult to express by the process parameters. The redundancy characteristics of the data can be eliminated and the complexity of the model can be reduced through LDA dimension reduction, so that the modeling process is simple and visual, and meanwhile, the co-linearity influence among the data is eliminated. In addition, LDA is a supervised dimension reduction method, can perform characteristic dimension reduction according to types, and can better build a model with classification efficiency. The method utilizes the statistical idea to estimate the intrinsic dimension, has higher accuracy and can be well applied to the LDA dimension reduction method.
3. Since most of normal data stations in the whole sample directly use a neural network method to detect and classify abnormal points, the accuracy of the model may be affected. The invention discloses a welding implicit abnormality detection and recognition method based on multi-source data, and detecting abnormal points by adopting an outlier factor detection method, and classifying the abnormal points by using a probability neural network. The local outlier factor LOF method is used as a density-based anomaly detection algorithm, can find out abnormal points according to the change of the neighborhood density, can capture invisible anomalies in the welding process more comprehensively, and detects anomalies which are difficult to observe by a single information source.
4. The LOF method requires determining the K neighborhood of each point, and therefore requires calculating the distance of each sample point from all other sample points in the dataset to find the K neighborhood, which is time-complex. According to the welding implicit anomaly detection and recognition method based on the multi-source data, the method of isolated forests is adopted, the data are divided into a plurality of subsets, and then a new neighborhood search space (not the whole subset) based on the thought of the isolated forests is selected from the subsets, so that the time complexity of LOF search K neighborhood is reduced. Meanwhile, the isolated forest can effectively detect global abnormality, LOF is suitable for finding local abnormal values and processing abnormal points in a dense area in a data set, and is effective for a data set with uneven density, so that the method of combining the isolated forest and the LOF can be adopted to detect the abnormal points in both the global and the local areas.
5. The invention discloses a welding implicit anomaly detection and identification method based on multi-source data, which is used for PNN, wherein the smoothing factor sigma is the only to be adjusted. In PNN, a smoothing factor is a parameter used to control the smoothness of a model, which is used as a gaussian kernel in computing similarity, affecting the model's adaptability to data distribution. In training PNN models, the smoothing factor is typically adjusted by training the data to better adapt the model to the data. The artificial bee colony algorithm is used for simulating honey collection behaviors of bees to solve optimization problems of multiple dimensions and multiple modes in life, and is initially applied to numerical optimization problems. The smoothing factor of PNN determines the degree of smoothness of the decision boundary. A larger smoothing factor will result in smoother decision boundaries, while a smaller smoothing factor will result in sharper decision boundaries. The smoothing factor is optimized through the artificial bee colony algorithm, so that a smoothing factor value suitable for the problem can be found, the complexity of the model is controlled, and excessive smoothing or excessive sharpness is avoided. The artificial bee colony algorithm has global searching capability, can explore wider solution space, dynamically adjusts the value of the smoothing factor in the iterative process, can enable the smoothing factor to be adaptively adjusted along with the optimization process, and has higher abnormality recognition precision after the optimization.
Drawings
Fig. 1 is a flowchart of a method for detecting and identifying welding implicit anomalies based on multi-source data according to an embodiment of the present invention.
Fig. 2 is a schematic diagram of detecting abnormal points in data in a method for detecting and identifying implicit abnormalities in welding based on multi-source data according to an embodiment of the present invention.
Fig. 3 is a schematic diagram of abnormality type identification in a method for detecting and identifying welding implicit abnormalities based on multi-source data according to an embodiment of the present invention.
Detailed Description
For a better description of the objects and advantages of the present invention, the following description will be given with reference to the accompanying drawings and examples.
Example 1:
In the field of welding abnormality detection, welding quality inspection generally uses single welding quality information, such as welding image information using convolutional neural network, or welding sound information using sound sensor, etc. The welding quality detection method adopting single image information is an effective method, but only can detect surface welding problems, and some implicit welding quality problems cannot be detected. By adopting the method of multi-source welding information, abnormal welding quality and abnormal types such as unfused and internal air holes and the like which are difficult to detect on the surface can be detected. The invention takes welding between the upper cover and the lower cover of the antenna in the manufacturing process of the communication equipment as an example for theoretical verification.
As shown in fig. 1, the method for detecting and identifying welding implicit anomalies based on multi-source data disclosed in this embodiment specifically comprises the following implementation steps:
1. Welding information acquisition
And acquiring multi-mode data welded between the upper cover and the lower cover of the antenna cover. An industrial CCD camera (image acquisition device), a thermal imager, a current, voltage Hall sensor, a microphone and a spectrometer are adopted. The image acquisition device acquires the front image of the molten pool and obtains the shape and size information of the molten pool. The thermal imager collects information of temperature fields at two sides of the molten pool. The current and voltage Hall sensor collects current and voltage information during welding. The microphone collects sound information during the welding process. The spectrometer collects arc spectrum information during welding. And the controller is used for collecting the data such as images, temperatures, currents and the like in real time and storing the data into a corresponding database. Meanwhile, in the data transmission process, synchronous transmission and feature synchronous processing are carried out on the multi-source data.
And extracting features which are more beneficial to subsequent real-time information processing and process inspection from the original signals according to the welded signals. And extracting length and width size information of the molten pool and gray values of the image for the image information. For temperature, current, voltage, sound and spectral information, the mean, mean square, variance, peak-to-peak, kurtosis coefficient and skewness of the corresponding signals are extracted. For the extraction of these characteristic signals, the original signals are processed and extracted by using special related software on the market. For each welding object x' i, the length, width, gray value information of the puddle image [ g 1,g2,g3 ], the mean value, mean square value, variance, peak-to-peak value, kurtosis coefficient and skewness information of the temperature [ t 1,t2,t3,t4,t5,t6 ], the mean value, mean square value, variance, peak-to-peak value, kurtosis coefficient and skewness information of the current [ c 1,c2,c3,c4,c5,c6 ], the mean value, mean square value, variance, peak-to-peak value, kurtosis coefficient and skewness information of the voltage [ v 1,v2,v3,v4,v5,v6 ], the mean value, mean square value, variance, peak-to-peak value, kurtosis coefficient and skewness information of the sound [ a 1,a2,a3,a4,a5,a6 ], and the mean value, mean square value, variance, peak-to-peak value, kurtosis coefficient and skewness information of the spectrum [ l 1,l2,l3,l4,l5,l6 ]. Each data x' i, which can be represented as [gi,1,…,gi,3,ti,1,…,ti,6,ci,1,…,ci,6,vi,1,…,vi,6,ai,1,…,ai,6,li,1,...,li,6]; where i e 1, n, includes, in addition to the 33-dimensional process parameters, the numbers represented by their corresponding anomaly types, as shown in table 1.
TABLE 1 types of welding anomalies
2. Normalization processing
Converting each eigenvalue of the data x 'i into the [ -1,1] range, normalizing each multi-source data x' i by:
Wherein max (x 'i,j) is the maximum value of the multi-source data x' i in the j-th dimension, min (x 'i,j) is the minimum value of the multi-source data x' i in the j-th dimension, wherein i epsilon [1, n ];
Table 2 normalized characteristic data
3. Determining intrinsic dimensions
By using the statistical idea, if the variance of a group of data is caused by a real situation, the characteristic value of the variance should be larger than the average characteristic value of random data with the same number of tested and variable, and if the variance is smaller than the average characteristic value of random variable, the variance represented by the factor cannot be distinguished whether the variance is caused by the real situation or the random error, and the value is not reserved.
N=1500 normalized data Y i make up matrix Y, let Y be:
Obtaining the eigenvector of the matrix Y T Y
g,1,...,λg,3t,1,...,λt,6c,1,...,λc,6v,1,...,λv,6a,1,...,λa,6l,1,...,λl,6].
A matrix X (b) of random data having the same number n and dimension as the Y matrix of group a is generated. Wherein b.epsilon.1, a, m is the dimension of X (b), which is the same as the dimension of X. The eigenvector [ lambda (b) 1,λ(b)2,…,λ(b)m ] of the matrix X (b) is found, and the average value of all eigenvalues is further calculatedWhere j is the data dimension, j e [1, m ], and the mean feature vector is [ lambda (B) 1,λ(B)2,…,λ(B)m ]. And comparing the eigenvectors of the matrix Y T Y and the eigenvalues in the mean eigenvector in the same dimension one by one, determining the number of the eigenvalues of the matrix Y T Y larger than the eigenvalues of the matrix X (b) T X (b), and marking as d to obtain the eigenvalue of the normalized data Y i, wherein d=6.
4. LDA dimension reduction
(1) The welding quality is divided into N=7 classes, the number of welding objects is n=1500, the j-th class set in the welding objects is Y j, and the intra-class divergence S w is calculated:
Wherein S wj represents the intra-class divergence of the j-th class, μ j represents the mean vector of the welding object y i of the j-th class, i ε [1, n ], j ε [1, N ];
(2) Calculating an inter-class divergence S n:
Wherein n j is the number of the j-th welding objects y i, and mu is the mean vector of the welding objects y i;
(3) The intra-class divergence S w and the inter-class divergence S b are adopted to obtain the following targets:
The matrix W is a matrix formed by tense eigenvectors corresponding to d largest eigenvalues, and the optimization objective function is further obtained by deduction:
Where d is the intrinsic dimension of the data. Then, for any one normalized data y i, the data x i=WTyi is obtained after the dimension reduction, i epsilon [1, n ], n is the number of samples. The reduced data x i is represented as [ x i,1,xi,2,xi,3,...,xi,d ], the reduced feature data of the LDA is shown in table 3, and the weight matrix W of the LDA is as follows:
TABLE 3 LDA feature data after dimension reduction
5. Data outlier detection
The data outlier detection step is shown in fig. 2;
5.1, dividing the data X i obtained after the three 1500 dimension reduction in the step three by adopting an isolated forest method, and dividing for 3 times, i epsilon [1,1500] to obtain 8 sample subsets X 1,X2,X3,...,X8.
Dividing the data set X into two parts X ' 1 and X ' 2,X′1 according to the value of X i,j, wherein the j dimension of the part X ' 2,X′1 is larger than the j dimension of the part X i,j,X′2 and smaller than or equal to X i,j;
Judging the distance between the new welding object point x n+1 and the division boundary x i,j, if x n+1 is close to the division boundary, namely min [ ther (x i,j)]<xn+1,j<max[ther(xi,j) ], changing the position of the division boundary, and making x i,j be ther (x i,j);
Wherein a i and b i are random two points of the sample subset that are separated by a distance k;
5.2 selecting a neighborhood search space from 8 sample subsets obtained in 5.1 by adopting an isolated forest;
Calculating the average path length of each of the reduced dimension data x i The calculation formula is as follows:
N=100 is the number of spanning trees in the isolated forest, p i,j is the path length of the ith reduced dimension x i in the jth tree, i e1, N;
determining a threshold p based on normal and abnormal data in the dimension reduction data x i when When the point is added into the neighborhood search space, the point in the sample subset search space is marked asThe number of the divided sample subsets is [1,8];
5.3 calculating a LOF value of the new welding object point x n+1;
Determining k-neighborhood of new welding object x n+1, determining sample subset of x n+1 as l, and recording points in the sample subset as
Wherein, the For a subset of samples, points inIs a mean path length of (a);
Then calculate all points in the new welding object x n+1 and sample subset Distance between
Wherein j isIn the first, j E [1, d ], distance points in the subsetIs the kth point of (2)The distance between them is recorded as
The k-neighborhood of point x n+1 is centered on point x n+1, the distance in the subset is less thanIf the k-neighborhood of point x n+1 is marked asThe number of points in the k-neighborhood of point x n+1 is noted asPoints in the k-neighborhood of point x n+1 The kth reachable distance to point x n+1 is:
the local reachable density of points x n+1 is calculated:
calculating local anomaly factors of the point x n+1:
calculating local anomaly factors of the training data x i and the test data point x n+i as shown in table 4, wherein x n+i is a new welding object point;
TABLE 4 local anomaly factors for training data
TABLE 5 local anomaly factors for test data
And determining whether the data point is abnormal according to the value range of the local abnormality factor.
Performing anomaly discrimination on the test data according to the range of the local outlier factor of the test data point x n+i, wherein 0 represents a normal point, and 1 represents an abnormal point;
Table 6 abnormality determination output of test data points
6. Abnormal species identification
The abnormal species identification step is shown in fig. 3;
The 6.1PNN model consists of an input layer, an implicit layer, a summation layer and an output layer;
Inputting the abnormal data point v i after the dimension reduction, wherein the abnormal data point v i is the abnormal point in the data point x i after the dimension reduction, d dimensions [ v i,1,vi,2,vi,3,…,vi,d ], d=6 and the abnormal type in 6 are arranged for each abnormal point v i, and the abnormal points v i and the j data points of the h abnormal type are calculated by using the Parzen method to calculate the hidden layer and the summation layer together, wherein i < n And the hidden layer output of the same abnormal mode is weighted and summed, and the relational expression is as follows:
Where σ is the smoothing factor, d is the input vector dimension, v i is the input vector, The m is the number of data points v i of the j-th abnormal type;
The number of neurons of the output layer is the total abnormal category number, threshold identification is carried out on f h(vi), and neurons with the maximum posterior probability density are found out from all the neurons of the output layer;
y=argmax(fh(vi))
Optimizing the smoothing factor sigma of PNN by adopting an artificial bee colony algorithm ABC, and identifying the abnormal cause of the abnormal result of the abnormal detection model in the step four by adopting an optimization model;
6.2.1, setting number of honey sources as o, number of leading bees and upper limit of honey source test times, determining value range of smoothing factor as [0,1], randomly generating initial smoothing factor, and its expression is
Wherein sigma z is the z-th honey source, z is [1, o ], j is the dimension of sigma z, namely the j-th smoothing factor in PNN, and the number of j is the number of abnormal points v i; a random number from 0 to 1;
6.2.2 evaluating the effect of the smoothing factor with the correct number of classifications of PNN as a fitness function, wherein Cor (σ z)[argmax(f(vi)) ] represents the number of correct predictions with the smoothing factor σ z for all outlier data points v i;
6.2.3, leading the bee stage, searching a new smoothing factor sigma' i nearby the initial smoothing factor sigma z, wherein the formula is as follows;
σ′zj=max{0,min{vzj,1}}
Wherein the method comprises the steps of For random values of-1 to 1, σ kj is a random value in σ zj, comparing cor (σ z)[argmax(f(xi)) ] with cor (σ 'z)[argmax(f(xi)) ] which is the number of times the result is predicted correctly using the smoothing factor σ' z, leaving cor (σ z)[argmax(f(xi)) ] as a new smoothing factor, leaving cor (σ z)[argmax(f(xi))]<cor(σ′z)[argmax(f(xi) as a new smoothing factor, leaving cor (σ z)[argmax(f(xi)) as a new smoothing factor, leaving cor (σ z)[argmax(f(xi))]=cor(σ′z)[argmax(f(xi) as a smoothing factor, leaving cor (σ z)[argmax(f(xi)) ] as a new smoothing factor, and R (σ z) is the number of times the z-th honey source is updated, R (σ z)=R(σz) +1 if σ z is transformed;
6.2.4, following the bee stage, selecting a smoothing factor by adopting a roulette method:
Wherein, p z is the probability of selecting a honey source sigma z, z epsilon [1, o ], follow bees select a honey source sigma z from the optimal result of 6.2.3 according to the probability, then find a new smoothing factor sigma' i nearby sigma z according to a 6.2.3 method, leave a better smoothing factor marked as sigma z;R(σz) as the number of times the z-th honey source is updated, if sigma z is transformed, R (sigma z)=R(σz) +1;
6.2.5, in the bee reconnaissance stage, searching the updated times R (sigma z) of each honey source, and updating the honey source by the following formula when the preset threshold is not updated, so as to search a global optimal solution;
Comparing cor (sigma z)[argmax(f(xi) of the optimal sigma z obtained by 6.2.4 with cor (sigma 'z)[argmax(f(xi) of sigma' z obtained by 6.2.5 update according to 6.2.3 method, keeping the better smooth factor recorded as sigma z, repeating steps 6.2.1-6.2.5 until the number of iterations is reached, obtaining the optimized smooth factor, and the smooth factor of the probability neural network is shown in table 7;
TABLE 7 smoothing factor of probabilistic neural network
6.3, Adopting the optimized model to identify the abnormal cause of the abnormal result of the step four abnormal detection model, adopting the optimized PNN model to input the new abnormal welding object v n+1 identified in the step four, and calculating the j data point of the h abnormal in the new abnormal point v n+1 and the data point v i of the abnormal after the dimension reductionAnd the hidden layer output of the same abnormal mode is weighted and summed, and the relational expression is as follows:
Where σ is the smoothing factor, d is the input vector dimension, v n+1 is the new input vector, The h abnormal data points in the h abnormal class in the data points v i after the dimension reduction are j abnormal data points, h epsilon u, and m is the number of the j abnormal class data points v i;
Performing threshold identification on the f h(vn+1), and finding out the neuron with the maximum posterior probability density from all the neurons of the output layer, wherein the type represented by the neuron is the abnormal type of v n+1;
table 8 abnormal class output of test data
While the foregoing detailed description has described the objects, aspects and advantages of the invention in further detail, it should be understood that the foregoing description is only illustrative of the invention, and is intended to cover various modifications, equivalents, alternatives, and improvements within the spirit and scope of the present invention.

Claims (5)

1.一种基于多源数据的焊接隐性异常检测和识别方法,其特征在于:包括如下步骤,1. A method for detecting and identifying welding hidden anomalies based on multi-source data, characterized in that it comprises the following steps: 步骤一、对于n个相同的焊接对象,实时采集每个对象的焊接质量的多模态数据信息,并存储到数据库;所述多模态数据包括:熔池正面图像、熔池两侧温度场信息、焊接时的电流和电压信息、焊接过程中的声音信息以及焊接时的电弧光谱信息;Step 1: For n identical welding objects, multimodal data information on the welding quality of each object is collected in real time and stored in a database; the multimodal data includes: an image of the front of the molten pool, temperature field information on both sides of the molten pool, current and voltage information during welding, sound information during welding, and arc spectrum information during welding; 步骤二:对步骤一采集到的多模态数据信息进行特征提取,得到多源数据;从熔池正面图像中提取熔池的尺寸信息和图像的灰度值;从熔池两侧温度场信息、焊接时的电流和电压信息、焊接过程中的声音信息以及焊接时的电弧光谱信息中,提取相应信号的均值、均方值、方差、峰峰值、峰态系数和偏度;Step 2: Feature extraction is performed on the multimodal data information collected in step 1 to obtain multi-source data; the size information of the molten pool and the grayscale value of the image are extracted from the front image of the molten pool; the mean, mean square value, variance, peak-to-peak value, kurtosis coefficient and skewness of the corresponding signals are extracted from the temperature field information on both sides of the molten pool, the current and voltage information during welding, the sound information during welding, and the arc spectrum information during welding; 步骤三:对步骤二提取到的多源数据进行归一化处理;再采用LDA方法对多源数据进行降维处理;Step 3: Normalize the multi-source data extracted in step 2; then use the LDA method to reduce the dimensionality of the multi-source data; 步骤四:采用局部离群因子算法LOF对多源数据进行异常检测建模,得到异常检测模型;根据异常检测模型识别出的新的异常焊接对象;Step 4: Use the local outlier factor algorithm LOF to perform anomaly detection modeling on multi-source data to obtain an anomaly detection model; identify new abnormal welding objects based on the anomaly detection model; 步骤五:构建用于焊接隐性异常检测和识别的概率神经网络PNN网络模型,采用ABC算法优化PNN的平滑因子σ,得到概率神经网络PNN网络优化模型,根据概率神经网络PNN网络优化模型实现焊接隐性异常检测和识别。Step 5: Construct a probabilistic neural network (PNN) network model for welding hidden anomaly detection and identification, use the ABC algorithm to optimize the smoothing factor σ of the PNN, obtain the probabilistic neural network (PNN) network optimization model, and realize welding hidden anomaly detection and identification based on the probabilistic neural network (PNN) network optimization model. 2.如权利要求1所述的一种基于多源数据的焊接隐性异常检测和识别方法,其特征在于:步骤二实现方法为,2. The method for detecting and identifying welding hidden anomalies based on multi-source data according to claim 1, wherein the method for implementing step 2 is: 对步骤一采集到的多模态数据信息进行特征提取,得到多源数据;熔池图像的长、宽、灰度值信息为[g1,g2,g3],温度的均值、均方值、方差、峰峰值、峰态系数和偏度信息为[t1,t2,t3,t4,t5,t6],电流的均值、均方值、方差、峰峰值、峰态系数和偏度信息为[c1,c2,c3,c4,c5,c6],电压的均值、均方值、方差、峰峰值、峰态系数和偏度信息为[v1,v2,v3,v4,v5,v6],声音的均值、均方值、方差、峰峰值、峰态系数和偏度信息为[a1,a2,a3,a4,a5,a6],光谱的均值、均方值、方差、峰峰值、峰态系数和偏度信息为[l1,l2,l3,l4,l5,l6];Feature extraction is performed on the multimodal data information collected in step 1 to obtain multi-source data; the length, width, and grayscale value information of the molten pool image is [g 1 , g 2 , g 3 ], the mean, mean square value, variance, peak-to-peak value, kurtosis coefficient, and skewness information of the temperature is [t 1 , t 2 , t 3 , t 4 , t 5 , t 6 ], the mean, mean square value, variance, peak-to-peak value, kurtosis coefficient, and skewness information of the current is [c 1 , c 2 , c 3 , c 4 , c 5 , c 6 ], the mean, mean square value, variance, peak-to-peak value, kurtosis coefficient, and skewness information of the voltage is [v 1 , v 2 , v 3 , v 4 , v 5 , v 6 ], and the mean, mean square value, variance, peak-to-peak value, kurtosis coefficient, and skewness information of the sound is [a 1 , a 2 , a 3 , a 4 , a 5 , a 6 ], the mean, mean square value, variance, peak-to-peak value, kurtosis coefficient and skewness information of the spectrum are [l 1 , l 2 , l 3 , l 4 , l 5 , l 6 ]; 则n个焊接对象中每一个数据x′i,表示为[gi,1,...,gi,3,ti,1,...,ti,6,Ci,1,...,Ci,6,vi,1,...,vi,6,ai,1,...,ai,6,li,1,...,li,6];其中i∈[1,n]。Then each data x′ i in the n welding objects is expressed as [gi ,1 ,...,gi ,3 ,ti ,1 ,...,ti ,6 ,Ci ,1 ,...,Ci ,6 ,vi ,1 ,...,vi ,6 ,ai ,1 ,...,ai ,6 ,li ,1 ,...,li ,6 ]; where i∈[1,n]. 3.如权利要求2所述的一种基于多源数据的焊接隐性异常检测和识别方法,其特征在于:步骤三实现方法为,3. The method for detecting and identifying welding hidden anomalies based on multi-source data according to claim 2, wherein the method for implementing step 3 is: 步骤3.1:将每一个特征值转化到[-1,1]范围内,通过下式对每个多源数据x′i进行归一化处理:Step 3.1: Convert each eigenvalue to the range of [-1, 1] and normalize each multi-source data x′ i using the following formula: 式中,max(x′i,j)为多源数据x′i在第j维的最大值,min(x′i,j)为多源数据x′i在第j维的最小值;其中i∈[1,n];归一化后每一个焊接对象为yi,表示为[Gi,1,...,Gi,3,Ti,1,...,Ti,6,Ci,1,...,Ci,6,Vi,1,...,Vi,6,Ai,1,...,Ai,6,Li,1,...,Li,6];其中i∈[1,n];where max(x′ i, j ) is the maximum value of the multi-source data x′ i in the j-th dimension, and min(x′ i, j ) is the minimum value of the multi-source data x′ i in the j-th dimension; i∈[1,n]; after normalization, each welding object is yi , expressed as [Gi ,1 ,...,Gi ,3 ,Ti ,1 ,...,Ti ,6 ,Ci ,1 ,...,Ci ,6 ,Vi ,1 ,...,Vi ,6 ,Ai ,1 ,...,Ai ,6 ,Li ,1 ,...,Li ,6 ]; i∈[1,n]; 步骤3.2:n个归一化数据yi组成矩阵Y,对矩阵Y进行本征维估计;Step 3.2: The n normalized data yi form a matrix Y, and the intrinsic dimension of the matrix Y is estimated; 步骤3.2.1、令Y为Step 3.2.1, let Y be 得到矩阵YTY的特征向量Get the eigenvectors of matrix Y T Y g,1,...,λg,3,λt,1,...,λt,6,λc,1,...,λc,6,λv,1,...,λv,6,λa,1,...,λa,6,λl,1,...,λl,6];g,1 ,...,λ g,3t,1 ,...,λ t,6c,1 ,...,λ c,6v,1 ,...,λ v,6a,1 ,...,λ a,6l,1 ,...,λ l,6 ]; 步骤3.2.2、生成a组和Y矩阵有相同的个数n和维数的随机数据的矩阵X(b);其中b∈[1,a],m为X(b)的维数,其与X的维数相同;则X(b)有如下矩阵形式;Step 3.2.2. Generate a matrix X(b) of random data with the same number n and dimension as the Y matrix; where b∈[1,a], and m is the dimension of X(b), which is the same as the dimension of X; then X(b) has the following matrix form; 步骤3.2.3、求矩阵X(b)的特征向量[λ(b)1,λ(b)2,…,λ(b)m],进一步计算所有特征值的平均值其中j为数据维数,j∈[1,m];则均值特征向量为[λ(B)1,λ(B)2,…,λ(B)m];Step 3.2.3. Find the eigenvectors [λ(b) 1 ,λ(b) 2 ,…,λ(b)m] of the matrix X(b), and further calculate the average of all eigenvalues Where j is the data dimension, j∈[1,m]; then the mean eigenvector is [λ(B) 1 ,λ(B) 2 ,…,λ(B) m ]; 步骤3.2.4、逐一对比相同维数下矩阵YTY的特征向量和均值特征向量中的特征值,确定矩阵YTY的特征值大于矩阵X(b)TX(b)特征值的个数,记为d,则归一化后的数据yi的本征维数为d;Step 3.2.4. Compare the eigenvalues of the eigenvectors and mean eigenvectors of the matrix Y T Y with the same dimension one by one. Determine the number of eigenvalues of the matrix Y T Y that are greater than the eigenvalues of the matrix X(b) T X(b). This is denoted by d. The intrinsic dimension of the normalized data y i is d. 步骤3.3:采用LDA的降维方法对多源数据进行降维处理;Step 3.3: Use LDA dimensionality reduction method to reduce the dimensionality of multi-source data; (1)焊接质量共分为N类,焊接对象数量为n,焊接对象中第j类集合为Yj,计算类内散度Sw(1) The welding quality is divided into N categories, the number of welding objects is n, the set of the jth category of welding objects is Y j , and the intra-class divergence S w is calculated as: 其中Swj表示第j类的类内散度,μj表示第j类的焊接对象yi的均值向量,i∈[1,n],j∈[1,N];Where S wj represents the intra-class divergence of the j-th class, μ j represents the mean vector of the welding objects yi in the j-th class, i∈[1,n],j∈[1,N]; (2)计算类间散度Sb(2) Calculate the inter-class divergence S b : 其中nj为第j类焊接对象yi的个数,μ为焊接对象yi的均值向量;Where n j is the number of welding objects y i of the jth type, μ is the mean vector of welding objects y i ; (3)采用类内散度Sw和类间散度Sb,得到目标为:(3) Using the intra-class divergence Sw and inter-class divergence Sb , the target is: 其中矩阵W为最大的d个特征值对应的特征向量张成的矩阵;进一步推导得出优化目标函数为:The matrix W is the matrix spanned by the eigenvectors corresponding to the largest d eigenvalues; further deduction shows that the optimization objective function is: 其中d为数据的本征维数;则对于任意一个归一化数据yi,经过降维后得到数据xi=WTyi,i∈[1,n],n为样本个数;则降维后的数据xi表示为[xi,1,xi,2,xi,3,...,xi,d]。Where d is the intrinsic dimension of the data; for any normalized data y i , after dimensionality reduction, the data xi = W T y i , i∈[1,n], n is the number of samples; the reduced-dimensional data xi is expressed as [xi ,1 ,xi ,2 ,xi ,3 ,...,xi ,d ]. 4.如权利要求3所述的一种基于多源数据的焊接隐性异常检测和识别方法,其特征在于:步骤四实现方法为,4. The method for detecting and identifying welding hidden anomalies based on multi-source data according to claim 3, wherein the method for implementing step 4 is: 步骤4.1、采用孤立森林的方法,选择孤立森林的前c层对步骤三n个降维后得到数据xi进行分割,i∈[1,n],得到2c个样本子集;Step 4.1: Use the isolation forest method to select the first c layers of the isolation forest to segment the data xi obtained after the n dimensionality reduction in step 3, i∈[1,n], and obtain 2c sample subsets; 第一层分割,选择一个维数j,之后再选择一个数据点xi,根据xi,j的值将数据集X划分成两部分X1和X2,X1部分第j维大于xi,j,X2部分第j维小于等于xi,j;第二层进一步分割X1和X2,以此类推分割至第c层;The first level of segmentation selects a dimension j, and then selects a data point x i . Based on the value of x i, j , the dataset X is divided into two parts, X 1 and X 2 . The jth dimension of part X 1 is greater than x i, j , and the jth dimension of part X 2 is less than or equal to x i, j . The second level further segments X 1 and X 2 , and so on until the cth level. 判断新的焊接对象点xn+1与分割边界xi,j的距离,若xn+1距离分割边界较近,即min[ther(xi,j)]<xn+1,j<max[ther(xi,j)],则变换该分割边界的位置;则令xi,j为ther(xi,j);Determine the distance between the new welding object point xn +1 and the segmentation boundary xi ,j. If xn +1 is closer to the segmentation boundary, that is, min[ther(xi ,j )]<xn +1,j <max[ther(xi ,j )], then change the position of the segmentation boundary; then let xi ,j be thether(xi ,j ). 其中,ai和bi为该样本子集中随机两个相距为k距离的点;Among them, a i and b i are two random points in the sample subset with a distance k between them; 步骤4.2:采用孤立森林从4.1得到的2c个样本子集中选择邻域搜索空间;Step 4.2: Use isolation forest to select the neighborhood search space from the 2c sample subsets obtained in 4.1; 计算每一个降维数据xi的平均路径长度计算公式为:Calculate the average path length of each dimension reduction data x i The calculation formula is: N为孤立森林中生成树的数量,pi,j为第i个降维数据xi在第j棵树中的路径长度,i∈[1,n];N is the number of spanning trees in the isolation forest, p i,j is the path length of the i-th dimension-reduced data x i in the j-th tree, i∈[1,n]; 根据降维数据xi中的正常与异常数据确定一个阈值p,当时,将该点加入邻域搜索空间,第,个样本子集搜索空间内的点记为划分的样本子集的个数l∈[1,2c];Determine a threshold p based on the normal and abnormal data in the dimension-reduced data xi . When , the point is added to the neighborhood search space, and the point in the ,th sample subset search space is recorded as The number of divided sample subsets l∈[1, 2 c ]; 步骤4.3:计算新的焊接对象点xn+1的LOF值;Step 4.3: Calculate the LOF value of the new welding object point xn +1 ; 确定新的焊接对象xn+1的k-邻域;首先通过下式确定xn+1所属的样本子集为l,记该样本子集中的点为 Determine the k-neighborhood of the new welding object xn +1 ; first determine the sample subset to which xn +1 belongs as l by the following formula, and record the points in the sample subset as 其中,为样本子集,中的点的平均路径长度;in, is a sample subset, the points in The average path length of 之后计算新的焊接对象xn+1与样本子集,中的所有点之间的距离 Then calculate the new welding object xn +1 and all points in the sample subset The distance between 其中,j为的维数,j∈[1,d];在第,子集中距离点的第k个点之间的距离,记为 Where j is The dimension of j∈[1,d]; in the first, distance point The kth point The distance between 点xn+1的k-邻域为以点xn+1为中心,子集中距离小于的点的集合,则点xn+1的k-邻域记为点xn+1的k-邻域内点的数量记为点xn+1的k-邻域中的点到点xn+1的第k可达距离为:The k-neighborhood of point xn+1 is centered at point xn +1 and contains subsets with distances less than The k-neighborhood of point x n+1 is The number of points in the k-neighborhood of point x n+1 is recorded as Points in the k-neighborhood of point x n+1 The kth reachable distance to point xn +1 is: 计算点xn+1的局部可达密度:Calculate the local reachability density of point xn +1 : 计算点xn+1的局部异常因子:Calculate the local outlier factor at point xn +1 : 其中为xn+1的k-邻域内的点的局部可达密度;in is a point in the k-neighborhood of x n+1 The local reachable density of 确定点xn+1的局部离群因子的范围,完成多源数据的异常检测建模:Determine the range of the local outlier factor of point xn+1 and complete the anomaly detection modeling of multi-source data: . 5.如权利要求4所述的一种基于多源数据的焊接隐性异常检测和识别方法,其特征在于:步骤五实现方法为,5. The method for detecting and identifying welding hidden anomalies based on multi-source data according to claim 4, wherein the method for implementing step 5 is: 步骤5.1:PNN模型由输入层、隐含层、求和层和输出层构成;Step 5.1: The PNN model consists of an input layer, a hidden layer, a summation layer, and an output layer. 输入降维后的异常的数据点vi,异常数据点vi是降维后的数据点xi中异常的点;对于每个异常点vi有d个维度[vi,1,vi,2,vi,3,…,vi,d],并且具有u中异常类型,将其输入到输入层;其中i<n;采用Parzen方法将隐含层与求和层一起计算,计算异常点vi与第h类异常的第j个数据点的关系,h∈u;并将同种异常模式的隐含层输出加权求和,其关系式如下:Input the abnormal data point vi after dimensionality reduction. The abnormal data point vi is the abnormal point in the data point x i after dimensionality reduction. For each abnormal point vi , there are d dimensions [vi , 1 , vi , 2 , vi , 3 , ..., vi , d ] and an abnormal type in u, which is input to the input layer; where i <n; use the Parzen method to calculate the hidden layer and the summation layer together to calculate the abnormal point vi and the j-th data point of the h-th abnormal type. , h∈u; and the weighted sum of the hidden layer outputs of the same abnormal pattern is calculated as follows: 其中σ为平滑因子,d为输入向量维数,vi为输入向量,为第h类异常的第j个异常数据点;m为第j类异常的数据点vi个数;Where σ is the smoothing factor, d is the dimension of the input vector, vi is the input vector, is the jth abnormal data point of the hth type of anomaly; m is the number of data points vi of the jth type of anomaly; 输出层的神经元个数为总的异常类别个数;对fh(vi)做阈值辨识,在所有输出层神经元中找出拥有最大后验概率密度的神经元;The number of neurons in the output layer is the total number of abnormal categories; perform threshold identification on f h ( vi ) and find the neuron with the largest posterior probability density among all neurons in the output layer; y=argmax(fh(vi))y=argmax(f h ( vi )) 步骤5.2:采用人工蜂群算法ABC优化PNN的平滑因子σ;采用优化模型对步骤四异常检测模型的异常结果进行异常原因识别;Step 5.2: Use the artificial bee colony algorithm (ABC) to optimize the smoothing factor σ of the PNN; use the optimization model to identify the cause of the abnormal results of the abnormality detection model in step 4; 步骤5.2.1、设定蜜源个数为o、引领蜂的数量以及蜜源试验次数上限;确定平滑因子的取值范围为[0,1];随机生成初始平滑因子,则其表达式为Step 5.2.1, set the number of nectar sources to o, the number of leading bees, and the upper limit of the number of nectar source tests; determine the value range of the smoothing factor to be [0, 1]; randomly generate the initial smoothing factor, and its expression is 其中σz为第z个蜜源,z∈[1,o];j为σz的维度,即PNN中的第j个平滑因子;j的个数为异常点vi个数;为0到1中的随机数;Where σz is the zth honey source, z∈[1,o]; j is the dimension of σz , that is, the jth smoothing factor in PNN; the number of j is the number of outliers vi ; A random number between 0 and 1; 步骤5.2.2、以PNN的分类的正确个数作为适应度函数,来评估平滑因子的效果;其中cor(σz)[argmax(f(vi))]表示对于所有异常的数据点vi,采用平滑因子σz预测结果正确的个数;Step 5.2.2: Use the number of correct classifications by the PNN as the fitness function to evaluate the effect of the smoothing factor; where cor(σ z )[argmax(f( vi ))] represents the number of correct predictions using the smoothing factor σ z for all abnormal data points vi ; 步骤5.2.3、引领蜂阶段,在初始平滑因子σz附近寻找新的平滑因子σ′i,其公式为;Step 5.2.3: In the leading bee stage, a new smoothing factor σ′ i is found near the initial smoothing factor σ z , and its formula is: σ′zj=max{0,min{vzj,1}}σ′ zj =max{0,min{v zj ,1}} 其中为-1到1的随机值,σkj为σzj中的随机值;比较cor(σz)[argmax(f(xi))]和cor(σ′z)[argmax(f(xi))]的大小,其中cor(σ′z)[argmax(f(xi))]为采用平滑因子σ′z预测结果正确的个数;当cor(σz)[argmax(f(xi))]>cor(σ′z)[argmax(f(xi))],留下cor(σz)[argmax(f(xi))]的平滑因子σz作为新的平滑因子,当cor(σz)[argmax(f(xi))]<cor(σ′z)[argmax(f(xi))],留下cor(σ′z)[argmax(f(xi))]的平滑因子σ′z作为新的平滑因子,当cor(σz)[argmax(f(xi))]=cor(σ′z)[argmax(f(xi))],留下cor(σz)[argmax(f(xi))]的平滑因子σz作为新的平滑因子;R(σz)为第z个蜜源被更新的次数,若σz变换,R(σz)=R(σz)+1;in is a random value between -1 and 1, and σ kj is a random value in σ zj ; compare the sizes of cor(σ z )[argmax(f( xi ))] and cor(σ′ z )[argmax(f( xi ))], where cor(σ′ z )[argmax(f( xi ))] is the number of correct prediction results using the smoothing factor σ′ z ; when cor(σ z )[argmax(f( xi ))]>cor(σ′ z )[argmax(f( xi ))], keep the smoothing factor σ z of cor(σ z )[argmax(f( xi ))] as the new smoothing factor; when cor(σ z )[argmax(f( xi ))]<cor(σ′ z )[argmax(f( xi ))], keep the smoothing factor σ′ z of cor(σ′z)[argmax(f( xi ))] as the new smoothing factor; when cor(σ z )[argmax(f( xi ))]=cor( σ′z )[argmax(f( xi ))], leaving the smoothing factor σz of cor( σz )[argmax(f( xi ))] as the new smoothing factor; R( σz ) is the number of times the zth nectar source is updated. If σz changes, R( σz )=R( σz )+1; 步骤5.2.4、跟随蜂阶段,采用轮盘赌方法选择平滑因子:Step 5.2.4: In the following bee stage, the smoothing factor is selected using the roulette wheel method: 其中,pz为选择蜜源σz的概率,z∈[1,o];跟随蜂根据概率从步骤5.2.3的最优结果中选择蜜源σz,在σz附近根据步骤5.2.3的方法寻找新的平滑因子σ′i,留下较优的平滑因子记为σz;R(σz)为第z个蜜源被更新的次数,若σz变换,R(σz)=R(σz)+1;Where pz is the probability of selecting nectar source σz , z∈[1,o]. The follower bee selects nectar source σz from the optimal result in step 5.2.3 based on the probability, and searches for a new smoothing factor σ′i near σz according to the method in step 5.2.3. The remaining smoothing factor with the better performance is recorded as σz . R( σz ) is the number of times the zth nectar source is updated. If σz changes, R( σz )=R( σz )+1. 步骤5.2.5、侦察蜂阶段,搜索每个蜜源被更新次数R(σz),当达到预设阈值未被更新,则将该蜜源用以下公式更新,用以搜索全局最优解;Step 5.2.5: In the scout bee stage, search for the number of times each nectar source has been updated (R(σ z )). If the number of updates reaches the preset threshold, the nectar source is updated using the following formula to search for the global optimal solution. 根据步骤5.2.3的方法,比较由步骤5.2.4得到的最优σz的cor(σz)[argmax(f(xi))]和由步骤5.2.5更新得到的σ′z的cor(σ′z)[argmax(f(xi))]的大小,留下较优的平滑因子记为σz;重复步骤5.2.1~5.2.5,直到达到迭代次数,得到优化后的平滑因子;Following the method in step 5.2.3, compare the optimal cor(σ z )[argmax(f( xi ))] of σ z obtained in step 5.2.4 with the updated cor(σ′ z )[argmax(f( xi ))] of σ′ z obtained in step 5.2.5, retaining the better smoothing factor and denoting it as σ z . Repeat steps 5.2.1 to 5.2.5 until the number of iterations is reached, obtaining the optimized smoothing factor. 步骤5.3、采用优化模型对步骤四异常检测模型的异常结果进行异常原因识别;采用优化后的PNN模型,将步骤四识别出的新的异常焊接对象vn+1输入,计算新异常点vn+1与降维后的异常的数据点vi中的第h类异常的第j个数据点的关系;并将同种异常模式的隐含层输出加权求和,其关系式如下:Step 5.3: Use the optimized model to identify the cause of the abnormality of the abnormal result of the abnormality detection model in step 4; use the optimized PNN model to input the new abnormal welding object vn +1 identified in step 4, and calculate the jth data point of the hth type of abnormality in the new abnormal point vn +1 and the abnormal data point vi after dimensionality reduction. The relationship between the hidden layer outputs of the same abnormal pattern is weighted and summed, and the relationship is as follows: 其中σ为平滑因子,d为输入向量维数,vn+1为新的输入向量,为降维后的异常的数据点vi中的第h类异常的第j个异常数据点,h∈u;m为第j类异常的数据点vi个数;Where σ is the smoothing factor, d is the dimension of the input vector, and v n+1 is the new input vector. is the jth abnormal data point of the hth type among the abnormal data points vi after dimensionality reduction, h∈u; m is the number of data points vi of the jth type; 对fh(vn+1)做阈值辨识,在所有输出层神经元中找出拥有最大后验概率密度的神经元,该神经元所代表的种类即为vn+1的异常类别,即实现焊接隐性异常检测和识别。Perform threshold identification on f h (v n+1 ) and find the neuron with the largest posterior probability density among all output layer neurons. The type represented by this neuron is the abnormal category of v n+1 , which means that welding hidden abnormality detection and identification can be achieved.
CN202410960492.2A 2024-07-17 2024-07-17 Welding implicit anomaly detection and identification method based on multi-source data Active CN118965216B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410960492.2A CN118965216B (en) 2024-07-17 2024-07-17 Welding implicit anomaly detection and identification method based on multi-source data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410960492.2A CN118965216B (en) 2024-07-17 2024-07-17 Welding implicit anomaly detection and identification method based on multi-source data

Publications (2)

Publication Number Publication Date
CN118965216A CN118965216A (en) 2024-11-15
CN118965216B true CN118965216B (en) 2025-09-19

Family

ID=93382586

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410960492.2A Active CN118965216B (en) 2024-07-17 2024-07-17 Welding implicit anomaly detection and identification method based on multi-source data

Country Status (1)

Country Link
CN (1) CN118965216B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119807978B (en) * 2025-03-12 2025-07-11 深圳华北工控软件技术有限公司 Intelligent image data recognition and analysis method, system and device based on AI model
CN120495194B (en) * 2025-04-29 2026-04-24 国网河北省电力有限公司雄安新区供电公司 A method and system for diagnosing the condition of high-voltage bushings
CN120940778A (en) * 2025-08-20 2025-11-14 南通万达能源动力科技有限公司 A welding parameter correction method based on real-time molten pool morphology feedback
CN120747643B (en) * 2025-08-28 2025-11-28 西安威尔精密技术有限公司 Automobile injection molding part defect classification method based on database comparison

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118051871A (en) * 2024-01-30 2024-05-17 上海骄成超声波技术股份有限公司 Laser welding process monitoring method, system and medium based on multi-source data fusion
CN118237825A (en) * 2024-05-28 2024-06-25 凯沃智能装备(青岛)有限公司 Welding machine method and welding robot based on artificial intelligence

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10552511B2 (en) * 2013-06-24 2020-02-04 Infosys Limited Systems and methods for data-driven anomaly detection
CN111856958A (en) * 2020-07-27 2020-10-30 西北大学 Smart home control system, control method, computer equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118051871A (en) * 2024-01-30 2024-05-17 上海骄成超声波技术股份有限公司 Laser welding process monitoring method, system and medium based on multi-source data fusion
CN118237825A (en) * 2024-05-28 2024-06-25 凯沃智能装备(青岛)有限公司 Welding machine method and welding robot based on artificial intelligence

Also Published As

Publication number Publication date
CN118965216A (en) 2024-11-15

Similar Documents

Publication Publication Date Title
CN118965216B (en) Welding implicit anomaly detection and identification method based on multi-source data
CN109684922B (en) A multi-model recognition method for finished dishes based on convolutional neural network
CN115984543B (en) A target detection algorithm based on infrared and visible light images
CN114882289B (en) Open set recognition method for SAR targets based on adaptive deterministic rejection criterion
CN118657784B (en) Desoldering detection method based on unmanned aerial vehicle acquisition of photovoltaic module image
Han et al. Defect detection: defect classification and localization for additive manufacturing using deep learning method
CN116343135B (en) A vehicle re-identification method based on post-feature fusion from pure vision
CN110363799B (en) Vision-based multi-motion human target tracking method in human-machine coexistence environment
CN117333948A (en) An end-to-end multi-target broiler behavior recognition method integrating spatiotemporal attention mechanism
CN114219763A (en) Infrared picture detection method for abnormal heating point of power distribution equipment based on fast RCNN algorithm
CN118896970B (en) Cable surface defect online detection method, device and storage medium
Monigari et al. Plant leaf disease prediction
CN110782181A (en) Calculation method and readable storage medium for line loss rate of low-voltage station area
CN115564983A (en) Target detection method and device, electronic equipment, storage medium and application thereof
CN117952956A (en) A method for predicting weld penetration based on log-likelihood estimation
CN114298130A (en) Short-term wind power prediction method and device
CN118228046A (en) A data-driven method for generating typical wind and solar power output scenarios
CN116740420B (en) Fine granularity image classification method based on multi-modal learning
CN114049305A (en) Distribution line pin defect detection method based on improved ALI and fast-RCNN
Durasov et al. Uncertainty estimation for 3D object detection via evidential learning
CN115034314B (en) System fault detection method and device, mobile terminal and storage medium
CN119090886B (en) A carbon fiber broken wire intelligent detection method and system
CN118897996B (en) A method, device, equipment and medium for evaluating similarity of radiation source signals
CN112036470A (en) A cloud-based multi-sensor fusion method for identification of Bemisia tabaci in cucumber
CN115908513A (en) Image feature matching method based on VGG16 network model

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant