[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN115563549B - Welding defect cause diagnosis method and system and electronic equipment - Google Patents

Welding defect cause diagnosis method and system and electronic equipment Download PDF

Info

Publication number
CN115563549B
CN115563549B CN202211323505.2A CN202211323505A CN115563549B CN 115563549 B CN115563549 B CN 115563549B CN 202211323505 A CN202211323505 A CN 202211323505A CN 115563549 B CN115563549 B CN 115563549B
Authority
CN
China
Prior art keywords
diagnosis
fuzzy
rule
neural network
cause
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
CN202211323505.2A
Other languages
Chinese (zh)
Other versions
CN115563549A (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.)
Wuhan University of Technology WUT
Original Assignee
Wuhan University of Technology WUT
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 Wuhan University of Technology WUT filed Critical Wuhan University of Technology WUT
Priority to CN202211323505.2A priority Critical patent/CN115563549B/en
Publication of CN115563549A publication Critical patent/CN115563549A/en
Application granted granted Critical
Publication of CN115563549B publication Critical patent/CN115563549B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/04Inference or reasoning models
    • G06N5/048Fuzzy inferencing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Biophysics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Automation & Control Theory (AREA)
  • Fuzzy Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Investigating And Analyzing Materials By Characteristic Methods (AREA)

Abstract

The invention relates to a welding defect cause diagnosis method, a system and an electronic device, wherein the method comprises the steps of establishing a fuzzy diagnosis rule and a cause diagnosis neural network database, combining the fuzzy diagnosis rule and the cause diagnosis neural network database to perform defect diagnosis, performing front item expansion based on a traditional fuzzy rule, adding a threshold, performing fuzzy reasoning by using a sample rule selected from the fuzzy diagnosis rule, obtaining a target diagnosis result according to the sample rule if the actual credibility is greater than a preset threshold, and performing complementary processing by using the cause diagnosis neural network if the actual credibility is not present, so as to obtain an ideal target diagnosis result. Compared with the traditional fuzzy neural network, the fuzzy neural network and the fuzzy rule processing method based on the fuzzy neural network combine two theories, namely, the fuzzy neural network has the advantage that fuzzy reasoning can process uncertainty knowledge, also has the advantages of self-learning, high efficiency and high precision of the neural network, greatly improves the reliability of the reasoning process, and is more suitable for welding the scene of multiple influencing factors.

Description

一种焊接缺陷成因诊断方法、系统及电子设备A method, system and electronic equipment for diagnosing causes of welding defects

技术领域Technical field

本发明涉及焊接缺陷诊断技术领域,尤其涉及一种焊接缺陷成因诊断方法、系统及电子设备。The present invention relates to the technical field of welding defect diagnosis, and in particular to a welding defect cause diagnosis method, system and electronic equipment.

背景技术Background technique

焊接缺陷产生的原因分析历来是焊接领域的难点,由于缺陷种类形态多样,缺陷形成原因复杂,因而缺陷成因诊断过于依赖人工经验,导致效率和可靠性极低。为解决此问题,具有智能诊断功能的焊接专家系统逐渐得到应用。Analysis of the causes of welding defects has always been a difficulty in the field of welding. Due to the various types of defects and the complex causes of defect formation, defect cause diagnosis relies too much on manual experience, resulting in extremely low efficiency and reliability. To solve this problem, welding expert systems with intelligent diagnostic functions are gradually being applied.

针对焊接缺陷成因检测的研究,中国专利《一种基于大数据的焊接缺陷分析系统及方法》(CN109447403A)提出了一种基于大数据的焊接缺陷分析系统,但由于选择的数据集的好坏直接影响着最后焊接缺陷成因的诊断,且知识库不具有相应的自学习能力,缺乏通用性。中国专利《一种基于稀疏矩阵的焊接缺陷诊断方法》(CN105223275A)提出了一种稀疏矩阵的焊接缺陷诊断方法,但是该方法获取的数据库来源都是自制的单一预制缺陷的标准样件,对于多缺陷非标焊件的检测不适用。For research on the cause detection of welding defects, the Chinese patent "A Welding Defect Analysis System and Method Based on Big Data" (CN109447403A) proposes a welding defect analysis system based on big data. However, due to the quality of the selected data set, the quality of the selected data set is directly affected. It affects the diagnosis of the causes of final welding defects, and the knowledge base does not have the corresponding self-learning ability and lacks versatility. The Chinese patent "A Welding Defect Diagnosis Method Based on Sparse Matrix" (CN105223275A) proposes a sparse matrix welding defect diagnosis method. However, the database sources obtained by this method are self-made standard samples with single prefabricated defects. For multiple The detection of defective non-standard weldments is not applicable.

通过上述研究可以知晓,现有技术多基于产生式规则进行演绎推理,即基于已有样本、已有数据集进行推断,并不能很好地反映缺陷特征、工艺参数与焊接缺陷成因之间复杂的非线性关系,诊断准确率较低,不用适用于焊接缺陷诊断识别这类非线性、多分类问题,不能够很好的处理不确定性知识。It can be known from the above research that the existing technology is mostly based on production rules for deductive reasoning, that is, inference based on existing samples and existing data sets, which cannot well reflect the complex relationship between defect characteristics, process parameters and causes of welding defects. Nonlinear relationship, low diagnostic accuracy, not suitable for nonlinear and multi-classification problems such as welding defect diagnosis and identification, and cannot handle uncertainty knowledge well.

发明内容Contents of the invention

有鉴于此,有必要提供一种焊接缺陷成因诊断方法、系统及电子设备,用以解决现有的焊接缺陷成因诊断技术过于依赖已有样本,不能够很好的处理焊接缺陷诊断这种非线性、多分类、具备不确定性知识的问题。In view of this, it is necessary to provide a welding defect cause diagnosis method, system and electronic equipment to solve the problem that the existing welding defect cause diagnosis technology relies too much on existing samples and cannot handle the non-linearity of welding defect diagnosis well. , multi-classification, problems with uncertain knowledge.

为达到上述技术目的,本发明采取了以下技术方案:In order to achieve the above technical objectives, the present invention adopts the following technical solutions:

第一方面,本发明提供了一种焊接缺陷成因诊断方法,包括:In a first aspect, the present invention provides a method for diagnosing the causes of welding defects, including:

确定评价因素和缺陷成因,基于扩展前项的模糊规则建立用于表征所述评价因素和所述缺陷成因之间模糊关系的多个模糊诊断规则;Determine the evaluation factors and the cause of the defect, and establish multiple fuzzy diagnostic rules for characterizing the fuzzy relationship between the evaluation factors and the cause of the defect based on the fuzzy rule extending the preceding item;

建立成因诊断神经网络模型,所述成因诊断神经网络模型的输入参数包括焊接缺陷类型和所述评价因素,所述成因诊断神经网络模型的输出参数包括诊断结果;Establish a cause diagnosis neural network model, the input parameters of the cause diagnosis neural network model include welding defect types and the evaluation factors, and the output parameters of the cause diagnosis neural network model include diagnosis results;

获取所述待诊断缺陷对应的实际焊接缺陷类型和评价因素数据;Obtain the actual welding defect type and evaluation factor data corresponding to the defect to be diagnosed;

基于所述评价因素数据,从多个所述模糊诊断规则中选择出匹配的模糊诊断规则作为样本规则,并对所述样本规则进行模糊推理,得到每个所述样本规则的实际可信度;Based on the evaluation factor data, select matching fuzzy diagnostic rules from multiple fuzzy diagnostic rules as sample rules, and perform fuzzy inference on the sample rules to obtain the actual credibility of each sample rule;

判断是否存在所述实际可信度大于预设阈值的所述样本规则,若是,则根据所述实际可信度大于所述预设阈值的所述样本规则的缺陷成因,得到目标诊断结果,若否,则根据所述成因诊断神经网络模型,得到目标诊断结果。Determine whether there is a sample rule whose actual credibility is greater than the preset threshold. If so, obtain a target diagnosis result based on the defect cause of the sample rule whose actual credibility is greater than the preset threshold. If If not, the target diagnosis result is obtained according to the cause diagnosis neural network model.

进一步的,所述确定评价因素和缺陷成因,基于扩展前项的模糊规则建立用于表征所述评价因素和所述缺陷成因之间模糊关系的多个模糊诊断规则,包括:Further, in determining the evaluation factors and defect causes, a plurality of fuzzy diagnostic rules for characterizing the fuzzy relationship between the evaluation factors and the defect causes are established based on the fuzzy rule extending the preceding item, including:

建立焊接特征信息库,根据所述焊接特征信息库得到所述评价因素和所述缺陷成因;Establish a welding feature information database, and obtain the evaluation factors and the defect causes based on the welding feature information database;

根据所述评价因素,基于扩展前项的模糊规则建立多个所述模糊诊断规则;According to the evaluation factors, a plurality of the fuzzy diagnosis rules are established based on the fuzzy rule extending the preceding item;

其中,每个所述模糊诊断规则均包括前项、后项、理论可信度和所述预设阈值,所述前项包括多个所述评价因素,所述后项包括所述缺陷成因。Each of the fuzzy diagnosis rules includes an antecedent, a consequent, a theoretical credibility and the preset threshold, the antecedent includes a plurality of the evaluation factors, and the consequent includes the cause of the defect.

进一步的,所述基于所述评价因素数据,从多个所述模糊诊断规则中选择出匹配的模糊诊断规则作为样本规则,并对所述样本规则进行模糊推理,得到每个所述样本规则的实际可信度,包括:Further, based on the evaluation factor data, a matching fuzzy diagnostic rule is selected from a plurality of the fuzzy diagnostic rules as a sample rule, and fuzzy inference is performed on the sample rule to obtain the result of each sample rule. Actual credibility, including:

基于所述评价因素数据,从多个所述诊断规则中选择出匹配的模糊诊断规则作为所述样本规则;Based on the evaluation factor data, select a matching fuzzy diagnostic rule from a plurality of the diagnostic rules as the sample rule;

根据所述实际焊接缺陷类型,基于层次分析法,得到每个所述评价因素对于所述实际焊接缺陷类型的权重系数;According to the actual welding defect type, based on the analytic hierarchy process, the weight coefficient of each evaluation factor for the actual welding defect type is obtained;

根据所述评价因素数据,得到所述样本规则中每个所述评价因素的隶属度;According to the evaluation factor data, the membership degree of each evaluation factor in the sample rule is obtained;

根据所述权重系数、所述隶属度,计算得到每个所述样本规则的实际可信度。According to the weight coefficient and the membership degree, the actual credibility of each sample rule is calculated.

进一步的,所述根据所述实际焊接缺陷类型,基于层次分析法,得到每个所述评价因素对于所述实际焊接缺陷类型的权重系数,包括:Further, according to the actual welding defect type, based on the analytic hierarchy process, the weight coefficient of each evaluation factor for the actual welding defect type is obtained, including:

根据所述实际焊接缺陷类型,建立所述评价因素的成对比较矩阵;According to the actual welding defect type, establish a pairwise comparison matrix of the evaluation factors;

对所述成对比较矩阵进行一致性检验,并根据检验结果调整所述成对比较矩阵;Perform a consistency test on the pairwise comparison matrix, and adjust the pairwise comparison matrix according to the test results;

根据调整后的所述成对比较矩阵,得到调整后的所述成对比较矩阵的特征向量;According to the adjusted pairwise comparison matrix, obtain the eigenvector of the adjusted pairwise comparison matrix;

对所述特征向量归一化处理,得到每个所述评价因素对于所述实际焊接缺陷类型的权重系数。The feature vector is normalized to obtain the weight coefficient of each evaluation factor for the actual welding defect type.

进一步的,所述判断是否存在所述实际可信度大于预设阈值的所述样本规则,若是,则根据所述实际可信度大于所述预设阈值的所述样本规则的缺陷成因,得到目标诊断结果,若否,则根据所述成因诊断神经网络模型,得到目标诊断结果,包括:Further, it is determined whether there is a sample rule whose actual credibility is greater than a preset threshold. If so, based on the cause of defects of the sample rule whose actual credibility is greater than the preset threshold, we obtain Target diagnosis result, if not, obtain the target diagnosis result based on the cause diagnosis neural network model, including:

将所述样本规则按照所述实际可信度的数值大小排序,得到样本规则序列;Sort the sample rules according to the numerical value of the actual credibility to obtain a sample rule sequence;

判断是否存在所述样本规则的所述实际可信度大于其对应的所述预设阈值,若是,则根据所述样本规则序列,选择所述实际可信度最高的设定数量个所述样本规则的缺陷成因,得到所述目标诊断结果,若否,则将所述评价因素数据及所述实际焊接缺陷类型输入至所述成因诊断神经网络模型中,并得到所述目标诊断结果。Determine whether there is a sample rule whose actual credibility is greater than its corresponding preset threshold. If so, select a set number of samples with the highest actual credibility based on the sample rule sequence. According to the regular defect causes, the target diagnosis result is obtained. If not, the evaluation factor data and the actual welding defect type are input into the cause diagnosis neural network model, and the target diagnosis result is obtained.

进一步的,所述建立成因诊断神经网络模型,包括:Further, the establishment of a cause diagnosis neural network model includes:

建立初始BP神经网络模型,所述初始BP神经网络模型的输入参数包括多个所述评价因素,所述初始BP神经网络模型的输出参数包括所述诊断结果;Establish an initial BP neural network model, the input parameters of the initial BP neural network model include a plurality of the evaluation factors, and the output parameters of the initial BP neural network model include the diagnostic results;

获取所述初始BP神经网络模型的初始参数,并通过PSO-BP算法进行优化,得到优化参数;Obtain the initial parameters of the initial BP neural network model, and optimize them through the PSO-BP algorithm to obtain the optimized parameters;

根据所述优化参数优化所述初始BP神经网络模型,得到所述成因诊断神经网络模型。The initial BP neural network model is optimized according to the optimization parameters to obtain the cause diagnosis neural network model.

进一步的,所述获取所述初始BP神经网络模型的初始参数,并通过PSO-BP算法进行优化,得到优化参数,包括:Further, the initial parameters of the initial BP neural network model are obtained and optimized through the PSO-BP algorithm to obtain optimized parameters, including:

获取所述初始BP神经网络模型的初始参数,所述初始参数包括神经元的权值、阈值和损失函数;Obtain initial parameters of the initial BP neural network model, where the initial parameters include weights, thresholds and loss functions of neurons;

根据所述神经元的权值和阈值,建立解空间和粒子种群,并初始化所述粒子种群在所述解空间中的位置;According to the weights and thresholds of the neurons, establish a solution space and a particle population, and initialize the position of the particle population in the solution space;

根据所述损失函数,建立适应度函数;According to the loss function, a fitness function is established;

根据所述适应度函数,优化所述粒子种群在所述解空间中的位置;According to the fitness function, optimize the position of the particle population in the solution space;

获取优化后的所述粒子种群在所述解空间中的位置,得到所述优化参数。Obtain the optimized position of the particle population in the solution space and obtain the optimization parameters.

第二方面,本发明还提供一种焊接缺陷成因诊断系统,包括:In a second aspect, the present invention also provides a welding defect cause diagnosis system, including:

规则建立模块,用于确定评价因素和缺陷成因,基于扩展前项的模糊规则建立用于表征所述评价因素和所述缺陷成因之间模糊关系的多个模糊诊断规则;A rule establishment module for determining evaluation factors and defect causes, and establishing multiple fuzzy diagnostic rules for characterizing the fuzzy relationship between the evaluation factors and the defect causes based on the fuzzy rules extending the preceding item;

网络建立模块,用建立成因诊断神经网络模型,所述成因诊断神经网络模型的输入参数包括焊接缺陷类型和所述评价因素,所述成因诊断神经网络模型的输出参数包括诊断结果;A network building module is used to establish a cause diagnosis neural network model. The input parameters of the cause diagnosis neural network model include welding defect types and the evaluation factors. The output parameters of the cause diagnosis neural network model include diagnosis results;

数据获取模块,用于获取所述待诊断缺陷对应的实际焊接缺陷类型和评价因素数据;A data acquisition module, used to obtain the actual welding defect type and evaluation factor data corresponding to the defect to be diagnosed;

模糊推理模块,用于基于所述评价因素数据,从多个所述模糊诊断规则中选择出匹配的模糊诊断规则作为样本规则,并对所述样本规则进行模糊推理,得到每个所述样本规则的实际可信度;A fuzzy inference module, configured to select a matching fuzzy diagnostic rule as a sample rule from a plurality of the fuzzy diagnostic rules based on the evaluation factor data, and perform fuzzy inference on the sample rule to obtain each of the sample rules. actual credibility;

结果诊断模块,用于判断是否存在所述实际可信度大于预设阈值的所述样本规则,若是,则根据所述实际可信度大于所述预设阈值的所述样本规则的缺陷成因,得到目标诊断结果,若否,则根据所述神经网络模型,得到目标诊断结果。A result diagnosis module is used to determine whether there is a sample rule whose actual credibility is greater than a preset threshold. If so, based on the cause of the defect of the sample rule whose actual credibility is greater than the preset threshold, The target diagnosis result is obtained. If not, the target diagnosis result is obtained according to the neural network model.

第三方面,本发明还提供了一种电子设备,包括存储器和处理器,其中,In a third aspect, the present invention also provides an electronic device including a memory and a processor, wherein,

存储器,用于存储程序;Memory, used to store programs;

处理器,与存储器耦合,用于执行存储器中存储的程序,以实现上述任一种实现方式中的焊接缺陷成因诊断方法中的步骤。The processor is coupled to the memory and is used to execute the program stored in the memory to implement the steps in the welding defect cause diagnosis method in any of the above implementations.

本发明提供的一种焊接缺陷成因诊断方法、系统及电子设备,其中方法通过建立模糊诊断规则及成因诊断神经网络数据库,并将二者结合起来共同进行焊接缺陷的诊断,具体地,其先基于传统的模糊规进行了前项扩展并加入了阈值,用从模糊诊断规则中选择出来的样本规则进行模糊推理,若存在实际可信度大于预设阈值的样本规则,则可以根据该样本规则得到目标诊断结果,若不存在,则可以认为现有的模糊诊断规则无法处理现有事实,此时利用成因诊断神经网络进行补充处理,便可以得到理想的目标诊断结果。相比于现有技术,本发明将模糊规则和神经网络两种理论相结合,使诊断过程即具备模糊推理能够处理不确定性知识的优点,也具备神经网络自学习、高效高精度的优点,极大地提高了推理过程的可靠性,相比于传统的模糊神经网络模型,更加适用于焊接这种多影响因素的场景。The invention provides a welding defect cause diagnosis method, system and electronic equipment. The method establishes fuzzy diagnosis rules and cause diagnosis neural network databases, and combines the two to jointly diagnose welding defects. Specifically, it is first based on The traditional fuzzy rule expands the previous item and adds a threshold. The sample rules selected from the fuzzy diagnostic rules are used for fuzzy inference. If there is a sample rule whose actual credibility is greater than the preset threshold, it can be obtained based on the sample rule. If the target diagnosis result does not exist, it can be considered that the existing fuzzy diagnosis rules cannot handle the existing facts. At this time, using the cause diagnosis neural network for supplementary processing, the ideal target diagnosis result can be obtained. Compared with the existing technology, the present invention combines fuzzy rules and neural network theories, so that the diagnosis process not only has the advantages of fuzzy reasoning that can handle uncertain knowledge, but also has the advantages of neural network self-learning, high efficiency and high accuracy. It greatly improves the reliability of the reasoning process. Compared with the traditional fuzzy neural network model, it is more suitable for scenarios with multiple influencing factors such as welding.

附图说明Description of the drawings

图1为本发明提供的焊接缺陷成因诊断方法一实施例的方法流程图;Figure 1 is a method flow chart of an embodiment of a welding defect cause diagnosis method provided by the present invention;

图2为本发明提供的焊接缺陷成因诊断方法一实施例中建立的焊接特征信息库的示意图;Figure 2 is a schematic diagram of the welding feature information database established in one embodiment of the welding defect cause diagnosis method provided by the present invention;

图3为图1中步骤S104一实施例的方法流程图;Figure 3 is a method flow chart of an embodiment of step S104 in Figure 1;

图4为图3中步骤S302一实施例的方法流程图;Figure 4 is a method flow chart of an embodiment of step S302 in Figure 3;

图5为本发明提供的焊接缺陷成因诊断系统一实施例的结构示意图;Figure 5 is a schematic structural diagram of an embodiment of a welding defect cause diagnosis system provided by the present invention;

图6为本发明提供的电子设备的结构示意图。Figure 6 is a schematic structural diagram of the electronic device provided by the present invention.

具体实施方式Detailed ways

下面结合附图来具体描述本发明的优选实施例,其中,附图构成本申请一部分,并与本发明的实施例一起用于阐释本发明的原理,并非用于限定本发明的范围。The preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings. The drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.

在本申请的描述中,“多个”的含义是两个或两个以上,除非另有明确具体的限定。In the description of this application, "plurality" means two or more than two, unless otherwise explicitly and specifically limited.

在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本发明的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those skilled in the art understand, both explicitly and implicitly, that the embodiments described herein may be combined with other embodiments.

本发明提供的一种焊接缺陷成因诊断方法、系统及电子设备,一方面,利用模糊理论提高了处理不确定性知识的能力;另一方面,利用神经网络的连接机制对模糊推理无法处理的事实进行补充推理,使之具备两种理论的优点,有助于在规则缺少或匹配度不高的情况下对焊接缺陷成因的诊断,对于促进焊接工艺自动化具有重要的工程实践意义。The invention provides a welding defect cause diagnosis method, system and electronic equipment. On the one hand, it uses fuzzy theory to improve the ability to process uncertain knowledge; on the other hand, it uses the connection mechanism of neural networks to deal with facts that fuzzy reasoning cannot handle. Supplementary reasoning has the advantages of both theories, which is helpful for diagnosing the causes of welding defects when rules are missing or the matching degree is not high. It has important engineering practical significance for promoting the automation of welding processes.

本发明提供了一种焊接缺陷成因诊断方法、系统及电子设备,以下分别进行说明。The present invention provides a welding defect cause diagnosis method, system and electronic equipment, which are described separately below.

结合图1所示,本发明的一个具体实施例,公开了一种焊接缺陷成因诊断方法,包括:As shown in Figure 1, a specific embodiment of the present invention discloses a method for diagnosing the causes of welding defects, which includes:

S101、确定评价因素和缺陷成因,基于扩展前项的模糊规则建立用于表征所述评价因素和所述缺陷成因之间模糊关系的多个模糊诊断规则;S101. Determine the evaluation factors and defect causes, and establish multiple fuzzy diagnostic rules for characterizing the fuzzy relationship between the evaluation factors and the defect causes based on the fuzzy rule extending the preceding item;

S102、建立成因诊断神经网络模型,所述成因诊断神经网络模型的输入参数包括焊接缺陷类型和所述评价因素,所述成因诊断神经网络模型的输出参数包括诊断结果;S102. Establish a cause diagnosis neural network model. The input parameters of the cause diagnosis neural network model include welding defect types and the evaluation factors. The output parameters of the cause diagnosis neural network model include diagnosis results;

S103、获取所述待诊断缺陷对应的实际焊接缺陷类型和评价因素数据;S103. Obtain the actual welding defect type and evaluation factor data corresponding to the defect to be diagnosed;

S104、基于所述评价因素数据,从多个所述模糊诊断规则中选择出匹配的模糊诊断规则作为样本规则,并对所述样本规则进行模糊推理,得到每个所述样本规则的实际可信度;S104. Based on the evaluation factor data, select matching fuzzy diagnostic rules as sample rules from multiple fuzzy diagnostic rules, and perform fuzzy inference on the sample rules to obtain the actual credibility of each sample rule. Spend;

S105、判断是否存在所述实际可信度大于预设阈值的所述样本规则,若是,则根据所述实际可信度大于所述预设阈值的所述样本规则的缺陷成因,得到目标诊断结果,若否,则根据所述成因诊断神经网络模型,得到目标诊断结果。S105. Determine whether there is a sample rule whose actual credibility is greater than the preset threshold. If so, obtain a target diagnosis result based on the defect cause of the sample rule whose actual credibility is greater than the preset threshold. , if not, obtain the target diagnosis result based on the cause diagnosis neural network model.

本发明提供的一种焊接缺陷成因诊断方法、系统及电子设备,其中方法通过建立模糊诊断规则及成因诊断神经网络数据库,并将二者结合起来共同进行焊接缺陷的诊断,具体地,其先基于传统的模糊规进行了前项扩展并加入了阈值,用从模糊诊断规则中选择出来的样本规则进行模糊推理,若存在实际可信度大于预设阈值的样本规则,则可以根据该样本规则得到目标诊断结果,若不存在,则可以认为现有的模糊诊断规则无法处理现有事实,此时利用成因诊断神经网络进行补充处理,便可以得到理想的目标诊断结果。相比于现有技术,本发明将模糊规则和神经网络两种理论相结合,使诊断过程即具备模糊推理能够处理不确定性知识的优点,也具备神经网络自学习、高效高精度的优点,极大地提高了推理过程的可靠性,相比于传统的模糊神经网络模型,更加适用于焊接这种多影响因素的场景。The invention provides a welding defect cause diagnosis method, system and electronic equipment. The method establishes fuzzy diagnosis rules and cause diagnosis neural network databases, and combines the two to jointly diagnose welding defects. Specifically, it is first based on The traditional fuzzy rule expands the previous item and adds a threshold. The sample rules selected from the fuzzy diagnostic rules are used for fuzzy inference. If there is a sample rule whose actual credibility is greater than the preset threshold, it can be obtained based on the sample rule. If the target diagnosis result does not exist, it can be considered that the existing fuzzy diagnosis rules cannot handle the existing facts. At this time, using the cause diagnosis neural network for supplementary processing, the ideal target diagnosis result can be obtained. Compared with the existing technology, the present invention combines fuzzy rules and neural network theories, so that the diagnosis process not only has the advantages of fuzzy reasoning that can handle uncertain knowledge, but also has the advantages of neural network self-learning, high efficiency and high accuracy. It greatly improves the reliability of the reasoning process. Compared with the traditional fuzzy neural network model, it is more suitable for scenarios with multiple influencing factors such as welding.

需要说明的是,本实施例中的评价因素,包括了能够导致焊接缺陷的任何影响因素,而缺陷成因是指形成待诊断缺陷的影响因素的具体量化情况,其表明了形成缺陷的具体原因,诊断结果则包括了缺陷成因,以及能够根据缺陷成因推导出来的诊断结论,如缺陷可能产生的原因、各个原因的可能性、工艺优化方案等。It should be noted that the evaluation factors in this embodiment include any influencing factors that can cause welding defects, and the cause of defects refers to the specific quantification of influencing factors that form the defects to be diagnosed, which indicates the specific reasons for the formation of defects. The diagnostic results include the cause of the defect and the diagnostic conclusions that can be deduced based on the cause of the defect, such as the possible causes of the defect, the possibility of each cause, and the process optimization plan.

具体地,作为优选的实施例,本实施例中的步骤S101、确定评价因素和缺陷成因,基于扩展前项的模糊规则建立用于表征所述评价因素和所述缺陷成因之间模糊关系的多个模糊诊断规则,具体包括:Specifically, as a preferred embodiment, step S101 in this embodiment determines the evaluation factors and the defect causes, and establishes a multi-dimensional fuzzy relationship between the evaluation factors and the defect causes based on the fuzzy rule that extends the preceding item. A fuzzy diagnosis rule, specifically including:

建立焊接特征信息库,根据所述焊接特征信息库得到所述评价因素和所述缺陷成因;Establish a welding feature information database, and obtain the evaluation factors and the defect causes based on the welding feature information database;

根据所述评价因素,基于扩展前项的模糊规则建立多个所述模糊诊断规则,每个所述模糊诊断规则均包括前项、后项、理论可信度和所述预设阈值,所述前项包括多个所述评价因素,所述后项包括所述缺陷成因。According to the evaluation factors, multiple fuzzy diagnostic rules are established based on the fuzzy rules extending the preceding term, each of the fuzzy diagnostic rules includes the preceding term, the subsequent term, the theoretical credibility and the preset threshold, and the The former term includes a plurality of the evaluation factors, and the latter term includes the causes of defects.

由此得出的焊接成因相比于传统的模糊规则模型,更加符合实际焊接的诊断需求。Compared with the traditional fuzzy rule model, the welding causes derived from this are more in line with the diagnostic needs of actual welding.

图2所示为本实施例中建立的焊接特征信息库,其可以从现有技术中直接获取,然后根据实际需要选用试验等方式,从该焊接特征信息库中,确定需要的评价因素。Figure 2 shows the welding feature information database established in this embodiment, which can be directly obtained from the existing technology, and then use testing and other methods according to actual needs to determine the required evaluation factors from the welding feature information database.

本实施例中,确定的评价因素包括:焊接方法C0、缺陷相对中心距离C1、两缺陷最近距离C2、缺陷长宽比C3、板厚C4、焊接电流C5、焊接电压C6、焊接速度C7、送丝速度C8、气体流量C9十个因素。In this embodiment, the determined evaluation factors include: welding method C 0 , relative center distance of defects C 1 , shortest distance between two defects C 2 , defect aspect ratio C 3 , plate thickness C 4 , welding current C 5 , welding voltage C 6. Welding speed C 7 , wire feeding speed C 8 , gas flow C 9 ten factors.

确定评价因素后便可以建立模糊诊断规则,本实施例中采用基于模糊规则的C-F模型设计模糊诊断规则,并对其进行进一步扩展,具体为对前项进行了扩展,增加了各条件的隶属度。本实施例中的模糊诊断规则设计如下:After determining the evaluation factors, the fuzzy diagnostic rules can be established. In this embodiment, the C-F model based on fuzzy rules is used to design the fuzzy diagnostic rules and further expanded. Specifically, the previous item is expanded and the membership degree of each condition is increased. . The fuzzy diagnosis rules in this embodiment are designed as follows:

IF E111)AND E222)…AND Ennn)THEN H(CF(H),λ)IF E 111 )AND E 222 )…AND E nnn )THEN H(CF(H),λ)

其中,E1、E2、…、En都对应各种已知的事实,即各个评价因素的实际情况;α1、α2、…、αn为权重系数,即各个事实对于缺陷成因的影响程度,本实施例中保证η12,…,ηn表示该事实的隶属度,CF(H)表示整条规则的理论可信度,λ为这条规则的预设阈值。上述参数中,权重系数和隶属度将在后续步骤中根据实际情况对应地进行计算。Among them, E 1 , E 2 ,..., E n all correspond to various known facts, that is, the actual situation of each evaluation factor; α 1 , α 2 ,..., α n are weight coefficients, that is, the influence of each fact on the cause of defects. The degree of influence is guaranteed in this embodiment η 1 , η 2 ,…, η n represents the membership degree of the fact, CF(H) represents the theoretical credibility of the entire rule, and λ is the preset threshold of this rule. Among the above parameters, the weight coefficient and membership degree will be calculated accordingly according to the actual situation in subsequent steps.

下表为本实施例中所建立的模糊诊断规则中的一部分:The following table is part of the fuzzy diagnostic rules established in this embodiment:

缺陷成因诊断部分规则Defect Cause Diagnosis Partial Rules

通过上述模糊诊断规则进行推理,且相对于传统的模糊规则模型,更加适用于焊接这种多影响因素的场景,提高了判断的准确性,能够提供合理的分析方案,有效地代替了人工专家,节省了大量的时间和人工成本,帮助操作人员及时有效地降低焊接缺陷所带来的影响,提高了焊接生产的自动化程度。同时,作为优选的实施例,本实施例中的步骤S102、建立成因诊断神经网络模型,所述成因诊断神经网络模型的输入参数包括焊接缺陷类型和所述评价因素,所述成因诊断神经网络模型的输出参数包括诊断结果,具体包括:Inference is carried out through the above fuzzy diagnostic rules, and compared with the traditional fuzzy rule model, it is more suitable for scenarios such as welding with multiple influencing factors, improves the accuracy of judgment, can provide reasonable analysis solutions, and effectively replaces manual experts. It saves a lot of time and labor costs, helps operators reduce the impact of welding defects in a timely and effective manner, and improves the automation of welding production. At the same time, as a preferred embodiment, step S102 in this embodiment is to establish a cause diagnosis neural network model. The input parameters of the cause diagnosis neural network model include welding defect types and the evaluation factors. The cause diagnosis neural network model The output parameters include diagnostic results, specifically including:

建立初始BP神经网络模型,所述初始BP神经网络模型的输入参数包括多个所述评价因素,所述初始BP神经网络模型的输出参数包括诊断结果;Establish an initial BP neural network model, the input parameters of the initial BP neural network model include a plurality of the evaluation factors, and the output parameters of the initial BP neural network model include diagnostic results;

获取所述初始BP神经网络模型的初始参数,并通过PSO-BP算法进行优化,得到优化参数;Obtain the initial parameters of the initial BP neural network model, and optimize them through the PSO-BP algorithm to obtain the optimized parameters;

根据所述优化参数优化所述初始BP神经网络模型,得到所述成因诊断神经网络模型。The initial BP neural network model is optimized according to the optimization parameters to obtain the cause diagnosis neural network model.

具体地,在一个优选的实施例中,上述过程中的所述获取所述初始BP神经网络模型的初始参数,并通过PSO-BP算法进行优化,得到优化参数,具体包括:Specifically, in a preferred embodiment, in the above process, the initial parameters of the initial BP neural network model are obtained and optimized through the PSO-BP algorithm to obtain the optimized parameters, which specifically includes:

获取所述初始BP神经网络模型的初始参数,所述初始参数包括神经元的权值、阈值和损失函数;Obtain initial parameters of the initial BP neural network model, where the initial parameters include weights, thresholds and loss functions of neurons;

根据所述神经元的权值和阈值,建立解空间和粒子种群,并初始化所述粒子种群在所述解空间中的位置;According to the weights and thresholds of the neurons, establish a solution space and a particle population, and initialize the position of the particle population in the solution space;

根据所述损失函数,建立适应度函数;According to the loss function, a fitness function is established;

根据所述适应度函数,优化所述粒子种群在所述解空间中的位置;According to the fitness function, optimize the position of the particle population in the solution space;

获取优化后的所述粒子种群在所述解空间中的位置,得到所述优化参数。Obtain the optimized position of the particle population in the solution space and obtain the optimization parameters.

为了更加方便地理解上述过程,本发明还提供一更加具体的实施例,该实施例中:In order to understand the above process more conveniently, the present invention also provides a more specific embodiment, in which:

(1)采集焊接实验数据,根据工艺试验数据建立单隐藏层的BP神经网络焊接缺陷分析模型作为初始BP神经网络模型,初始BP神经网络模型的输入参数包括多个所述评价因素,初始BP神经网络模型的输出参数包括诊断结果;(1) Collect welding experimental data, and establish a single hidden layer BP neural network welding defect analysis model as the initial BP neural network model based on the process test data. The input parameters of the initial BP neural network model include multiple evaluation factors. The initial BP neural network model The output parameters of the network model include diagnostic results;

(2)为了进一步提高模型的收敛效率和精确率,通过改进的PSO-BP算法利用初始BP神经网络的初始参数对所述初始BP神经网络模型进行初始值及参数更新改进,具体流程包括:(2) In order to further improve the convergence efficiency and accuracy of the model, the initial values and parameters of the initial BP neural network model are updated and improved through the improved PSO-BP algorithm using the initial parameters of the initial BP neural network. The specific process includes:

①利用初始BP神经网络的初始参数设置粒子群算法的具体参数,将初始BP神经网络结构中各神经元的权值及阈值设置为粒子的位置变量,并根据神经元的权值和阈值,建立解空间和粒子种群;将初始BP神经网络的损失函数设置为粒子的适应度函数,初始化粒子的种群,即初始化所述粒子种群在所述解空间中的位置;① Use the initial parameters of the initial BP neural network to set the specific parameters of the particle swarm algorithm, set the weights and thresholds of each neuron in the initial BP neural network structure as position variables of the particles, and establish based on the weights and thresholds of the neurons. Solution space and particle population; set the loss function of the initial BP neural network to the fitness function of the particles, and initialize the population of particles, that is, initialize the position of the particle population in the solution space;

②对每一个例子而言,都可以计算出粒子的适应度fi,并与该粒子的最小适应度fmin进行比较,若fi<fmin,则更新后的适应度就取值为该粒子的最小适应度fmin,对应的位置就是最佳位置Pi②For each example, the fitness fi of the particle can be calculated and compared with the minimum fitness f min of the particle. If fi <f min , the updated fitness will take the value of The minimum fitness f min of the particle, the corresponding position is the best position Pi ;

③粒子群通过更新自身的速度和位置来搜索整个状态空间,通过跟踪个体极值(粒子本身所找到的最佳适应度的最优解)和全局极值(整个种群当前找到的最佳适应度的最优解)更新自己直到找到最优解;③The particle swarm searches the entire state space by updating its own speed and position, and by tracking the individual extreme value (the optimal solution with the best fitness found by the particle itself) and the global extreme value (the best fitness currently found by the entire population) The optimal solution) updates itself until the optimal solution is found;

上述过程中粒子速度与位置的进化公式为:The evolutionary formula of particle speed and position in the above process is:

式中,ω为非线性动态变化惯性权重;c1和c2为学习因子;r1和r2为取值在[0,1]之间的随机数;pin(k)表示粒子个体位置极值;pgn(k)表示粒子全局位置极值;xin(k)为粒子i在k时刻的位置;xin(k+1)为粒子i在k+1时刻的位置;vin(k)为粒子i在k时刻的速度;vin(k+1)为粒子i在k+1时刻的速度;In the formula, ω is the nonlinear dynamic change inertia weight; c 1 and c 2 are learning factors; r 1 and r 2 are random numbers with values between [0,1]; p in (k) represents the individual position of the particle Extreme value; p gn (k) represents the extreme value of the global position of the particle; x in (k) is the position of particle i at time k; x in (k+1) is the position of particle i at time k+1; v in ( k) is the speed of particle i at time k; v in (k+1) is the speed of particle i at time k+1;

其中,上述非线性动态变化惯性权重ω表示为:Among them, the above nonlinear dynamic change inertia weight ω is expressed as:

其中,ωmin为最小惯性权重;ωmax为最大惯性权重,l1(t)是一个非线性函数,l2(t)是一个线性函数,fi为当前粒子的适应度,fmin为粒子最小适应度。l1(t)、l2(t)由下式确定:Among them, ω min is the minimum inertia weight; ω max is the maximum inertia weight, l 1 (t) is a nonlinear function, l 2 (t) is a linear function, f i is the fitness of the current particle, and f min is the particle Minimum fitness. l 1 (t), l 2 (t) are determined by the following formula:

式中t为模型当前迭代次数,tmax为模型最大迭代次数;In the formula, t is the current iteration number of the model, and t max is the maximum iteration number of the model;

④计算整个粒子群的最小适应度fg=min{f1,f2,…,fM},并判断当前迭代次数是否达到设置的最大迭代次数,若达到则迭代停止,否则转到②继续更新;④ Calculate the minimum fitness f g =min{f 1 , f 2 ,..., f M } of the entire particle swarm, and determine whether the current number of iterations reaches the set maximum number of iterations. If it reaches the set maximum number of iterations, the iteration will stop, otherwise go to ② to continue. renew;

⑤输出整个粒子群所确定的神经网络参数Pg=(pg1,pg2,...,pgD)作为神经网络结构的初值。再将粒子群算法与梯度下降算法结合,利用动态权重因子对神经网络参数进一步迭代更新。输出改进后的PSO-BP算法所确定的神经网络初始参数,替换初始BP神经网络的对应参数,以优化所述初始BP神经网络模型,得到所述成因诊断神经网络模型。⑤ Output the neural network parameters P g = (p g1 , p g2 ,..., p gD ) determined by the entire particle swarm as the initial value of the neural network structure. Then the particle swarm algorithm is combined with the gradient descent algorithm, and dynamic weight factors are used to further iteratively update the neural network parameters. The initial parameters of the neural network determined by the improved PSO-BP algorithm are output, and the corresponding parameters of the initial BP neural network are replaced to optimize the initial BP neural network model and obtain the cause diagnosis neural network model.

下表示出了本实施例的上述过程中需要的一些其他参数的具体值:The following table shows the specific values of some other parameters required in the above process of this embodiment:

基于动态权重的自适应PSO-BP算法参数设置Adaptive PSO-BP algorithm parameter setting based on dynamic weight

在本实施例的神经网络结构中,网络参数的更新方式保留了原本的梯度下降算法,并引入动态权重因子,将PSO算法与BP算法相结合,在迭代的不同阶段发挥不同算法的优势,提高训练速度和迭代效率。利用训练得到的PSO-BP神经网络模型,对模糊规则推理无法确定的事实进行补充诊断,确定焊接缺陷形成原因,并且根据评价结果对模型进行修正,例如将输出结果作为新的模糊诊断规则,使得整个方法具有自学习的特点,有效弥补了现有技术过于依赖已有样本的问题,有效提高了模型的训练效率与诊断精度;将规则推理与模型推理相结合形成规则-模型协同推理机制,相比于传统的神经网络或者模糊神经网络,增加了其自学习能力,更加适用于焊接这种多影响因素的场景,提高了推理方式的可靠度。In the neural network structure of this embodiment, the network parameter update method retains the original gradient descent algorithm, and introduces dynamic weight factors to combine the PSO algorithm and the BP algorithm to take advantage of different algorithms at different stages of iteration to improve Training speed and iteration efficiency. Use the trained PSO-BP neural network model to supplement the facts that cannot be determined by fuzzy rule reasoning, determine the cause of welding defects, and modify the model based on the evaluation results, such as using the output results as new fuzzy diagnosis rules, so that The entire method has the characteristics of self-learning, which effectively makes up for the problem of existing technologies that rely too much on existing samples, and effectively improves the training efficiency and diagnostic accuracy of the model. It combines rule reasoning and model reasoning to form a rule-model collaborative reasoning mechanism. Compared with traditional neural networks or fuzzy neural networks, it has increased self-learning capabilities, is more suitable for scenarios with multiple influencing factors such as welding, and improves the reliability of the reasoning method.

建立好模糊诊断规则和成因诊断神经网络模型后,便可以开始实际的诊断,首先需要进行步骤S103、获取所述待诊断缺陷对应的实际焊接缺陷类型和评价因素数据,其中评价因素数据为待诊断缺陷的评价因素对应的实际数值。After the fuzzy diagnosis rules and the cause diagnosis neural network model are established, the actual diagnosis can be started. First, step S103 needs to be performed to obtain the actual welding defect type and evaluation factor data corresponding to the defect to be diagnosed, where the evaluation factor data is The actual value corresponding to the evaluation factor of the defect.

进一步的,结合图3所示,作为优选的实施例,本实施例中的步骤S104、基于所述评价因素数据,从多个所述模糊诊断规则中选择出匹配的模糊诊断规则作为样本规则,并对所述样本规则进行模糊推理,得到每个所述样本规则的实际可信度,具体包括:Further, as shown in FIG. 3 , as a preferred embodiment, step S104 in this embodiment is to select a matching fuzzy diagnostic rule from a plurality of the fuzzy diagnostic rules as a sample rule based on the evaluation factor data. And perform fuzzy inference on the sample rules to obtain the actual credibility of each sample rule, which specifically includes:

S301、基于所述评价因素数据,从多个所述诊断规则中选择出匹配的模糊诊断规则作为所述样本规则;S301. Based on the evaluation factor data, select a matching fuzzy diagnosis rule from a plurality of the diagnosis rules as the sample rule;

S302、根据所述实际焊接缺陷类型,基于层次分析法,得到每个所述评价因素对于所述实际焊接缺陷类型的权重系数;S302. According to the actual welding defect type, based on the analytic hierarchy process, obtain the weight coefficient of each evaluation factor for the actual welding defect type;

S303、根据所述评价因素数据,得到所述样本规则中每个所述评价因素的隶属度;S303. According to the evaluation factor data, obtain the membership degree of each evaluation factor in the sample rule;

S304、根据所述权重系数、所述隶属度,计算得到每个所述样本规则的实际可信度。S304: Calculate the actual credibility of each sample rule based on the weight coefficient and the membership degree.

上述过程即为本实施例中的模糊推理的主要步骤,可以理解的是,因模糊推理为相关领域技术人员可以理解的现有技术,所以实际中,也可以采用其他模糊推理方式得到可信度。The above process is the main step of fuzzy inference in this embodiment. It can be understood that because fuzzy inference is an existing technology that can be understood by those skilled in the relevant field, in practice, other fuzzy inference methods can also be used to obtain credibility. .

作为优选的实施例,本实施例先从多个模糊诊断规则中剔除明显不合理的规则,选择合适的规则作为样本规则,然后进行步骤S302,具体地,请结合图4所示,本实施例中的步骤S302、根据所述实际焊接缺陷类型,基于层次分析法,得到每个所述评价因素对于所述实际焊接缺陷类型的权重系数,具体包括:As a preferred embodiment, this embodiment first eliminates obviously unreasonable rules from multiple fuzzy diagnosis rules, selects appropriate rules as sample rules, and then proceeds to step S302. Specifically, please refer to Figure 4. Step S302 in: According to the actual welding defect type, based on the analytic hierarchy process, obtain the weight coefficient of each evaluation factor for the actual welding defect type, specifically including:

S401、根据所述实际焊接缺陷类型,建立所述评价因素的成对比较矩阵;S401. Establish a pairwise comparison matrix of the evaluation factors according to the actual welding defect type;

S402、对所述成对比较矩阵进行一致性检验,并根据检验结果调整所述成对比较矩阵;S402. Perform a consistency test on the pairwise comparison matrix, and adjust the pairwise comparison matrix according to the test results;

S403、根据调整后的所述成对比较矩阵,得到调整后的所述成对比较矩阵的特征向量;S403. Obtain the eigenvector of the adjusted pairwise comparison matrix according to the adjusted pairwise comparison matrix;

S404、对所述特征向量归一化处理,得到每个所述评价因素对于所述实际焊接缺陷类型的权重系数。S404: Normalize the feature vector to obtain the weight coefficient of each evaluation factor for the actual welding defect type.

本发明还提供一更加具体的实施例,用以说明上述过程S401~S404:The present invention also provides a more specific embodiment to illustrate the above processes S401 to S404:

根据实际焊接类型,将各评价因素由领域专家确定相对重要性,然后两两进行对比,对比时采用如下表所示的相对比较1~5尺度:According to the actual welding type, the relative importance of each evaluation factor is determined by experts in the field, and then compared in pairs. The relative comparison scale of 1 to 5 is used for comparison as shown in the following table:

相对比较尺度relative comparison scale

利用上述相对比较尺度,得到成对比较矩阵A如下:Using the above relative comparison scale, the pairwise comparison matrix A is obtained as follows:

矩阵A中的各元素的计算按照下式计算:The calculation of each element in matrix A is calculated according to the following formula:

其中,i,j,k=0,1,2,3,...,n。Among them, i, j, k = 0, 1, 2, 3,..., n.

根据得出的成对比较矩阵A,求得利用最大特征根λmax对应的特征向量作为权向量ω,即Aω=λmax。对权向量进行归一化处理得到最终的权重系数。According to the obtained pairwise comparison matrix A, the eigenvector corresponding to the largest eigenvalue λ max is obtained as the weight vector ω, that is, Aω=λ max . The weight vector is normalized to obtain the final weight coefficient.

由于不同的评价因素对不同种类的缺陷特征影响不同,因此上述过程需要根据实际焊接缺陷类型灵活设定,本实施例中以“焊穿”缺陷为例,比较不同评价因素对焊接缺陷成因的重要性,得到成对比较矩阵A如下:Since different evaluation factors have different effects on different types of defect characteristics, the above process needs to be flexibly set according to the actual welding defect type. In this embodiment, the "welding penetration" defect is taken as an example to compare the importance of different evaluation factors on the causes of welding defects. property, the pairwise comparison matrix A is obtained as follows:

得到比较矩阵后需要对其进行一致性检验以验证合理性,比较过程可以通过计算一致性指标CR进行:After obtaining the comparison matrix, it needs to be tested for consistency to verify its rationality. The comparison process can be carried out by calculating the consistency index CR:

通过上式可得,建立的成对比较矩阵对于相关参数的权重分配合理,且可信度较高,可以计算权重系数。本实施例中根据上述矩阵得到的“焊穿”这一最终权重系数向量β为:It can be seen from the above formula that the established pairwise comparison matrix has reasonable weight distribution for relevant parameters and has high credibility, and the weight coefficient can be calculated. In this embodiment, the final weight coefficient vector β of “welding penetration” obtained based on the above matrix is:

β=(0.25,0.05,0.05,0.06,0.09,0.13,0.13,0.09,0.09,0.06)β=(0.25,0.05,0.05,0.06,0.09,0.13,0.13,0.09,0.09,0.06)

上述过程仅为一种实际焊接缺陷类型的权重系数,实际中不同焊接缺陷类型,均需要有针对地单独建立成对比较矩阵并计算权重系数。本实施例中,共有十个影响因素Ci,对应四种不同类型的缺陷Si,得到最终的缺陷权重系数表如下表所示。The above process is only a weight coefficient for an actual welding defect type. In practice, different welding defect types need to separately establish a pairwise comparison matrix and calculate the weight coefficient. In this embodiment, there are ten influencing factors C i , corresponding to four different types of defects S i , and the final defect weight coefficient table is obtained as shown in the following table.

缺陷权重系数表Defect weight coefficient table

确定权重系数后,便可以进行步骤S303及步骤S304,其中根据所述评价因素数据,利用隶属度函数来确定各个事实的隶属度,其具体过程为现有技术,本文中不做过多说明。然后进行步骤S304,本实施例中,每个模糊诊断规则的实际可信度λg可由下式计算:After the weight coefficient is determined, steps S303 and S304 can be performed, in which the membership function is used to determine the membership degree of each fact based on the evaluation factor data. The specific process is an existing technology and will not be explained in detail here. Then step S304 is performed. In this embodiment, the actual credibility λ g of each fuzzy diagnosis rule can be calculated by the following formula:

为了方便理解,本发明还提供一具体的实施例,用于说明上述实际可信度的计算过程。本实施例中所获取的评价因素数据为:焊接方法M“脉冲电弧焊”,缺陷相对中心距离l1“3mm”,两缺陷最近距离l2“1.2mm”,缺陷长宽比δ“1.1”,板厚b“6mm”,焊接电流I“142A”,焊接电压U“19.8V”,焊接速度Vh“0.36m/min”,送丝速度Vs“9.0m/min”,气体流量Vq“25L”。实际焊接缺陷类型为“气孔”,通过上述过程可知各个评价因素对于“气孔”这类缺陷的权重系数S3为0.25,0.05,0.05,0.06,0.08,0.06,0.06,0.13,0.13,0.13,进而可以求得上述三条模糊诊断规则(即前文表格中的规则1、规则2、规则3)的实际可信度λg1、λg2、λg3For ease of understanding, the present invention also provides a specific embodiment to illustrate the calculation process of the above-mentioned actual credibility. The evaluation factor data obtained in this example are: welding method M "pulse arc welding", relative center distance of the defect l 1 "3mm", shortest distance l 2 "1.2mm" between two defects, defect aspect ratio δ "1.1" , plate thickness b "6mm", welding current I "142A", welding voltage U "19.8V", welding speed V h "0.36m/min", wire feed speed V s "9.0m/min", gas flow rate V q "25L". The actual welding defect type is "pores". Through the above process, it can be seen that the weight coefficient S 3 of each evaluation factor for defects such as "pores" is 0.25, 0.05, 0.05, 0.06, 0.08, 0.06, 0.06, 0.13, 0.13, 0.13, and then The actual credibility λ g1 , λ g2 , and λ g3 of the above three fuzzy diagnostic rules (i.e., rule 1, rule 2, and rule 3 in the previous table) can be obtained:

λg1=0.95×(0.25×1+0.05×1+0.05×1+0.06×1+0.08×1+0.06×0.9+0.06×0.9+0.13×1+0.13×1+0.13×1)=0.9386λ g1 =0.95×(0.25×1+0.05×1+0.05×1+0.06×1+0.08×1+0.06×0.9+0.06×0.9+0.13×1+0.13×1+0.13×1)=0.9386

λg2=0.95×(0.25×1+0.05×1+0.05×1+0.06×1+0.08×1+0.06×0.9+0.06×0.9+0.13×1+0.13×1+0.13×0)=0.8151λ g2 =0.95×(0.25×1+0.05×1+0.05×1+0.06×1+0.08×1+0.06×0.9+0.06×0.9+0.13×1+0.13×1+0.13×0)=0.8151

λg3=0.90×(0.25×1+0.05×1+0.05×1+0.06×1+0.08×1+0.06×0.9+0.06×0.9+0.13×0.5+0.13×1+0.13×0.5)=0.7722λ g3 =0.90×(0.25×1+0.05×1+0.05×1+0.06×1+0.08×1+0.06×0.9+0.06×0.9+0.13×0.5+0.13×1+0.13×0.5)=0.7722

计算实际可信度后,便可以进行步骤S105、判断是否存在所述实际可信度大于预设阈值的所述样本规则,若是,则根据所述实际可信度大于所述预设阈值的所述样本规则的缺陷成因,得到目标诊断结果,若否,则根据所述神经网络模型,得到目标诊断结果,作为优选的实施例,本实施例中该步骤具体包括:After calculating the actual credibility, step S105 can be performed to determine whether there is a sample rule whose actual credibility is greater than the preset threshold. If so, based on all the sample rules whose actual credibility is greater than the preset threshold, Describe the defect causes of the sample rules and obtain the target diagnosis result. If not, obtain the target diagnosis result according to the neural network model. As a preferred embodiment, this step in this embodiment specifically includes:

将所述样本规则按照所述实际可信度的数值大小排序,得到样本规则序列;Sort the sample rules according to the numerical value of the actual credibility to obtain a sample rule sequence;

判断是否存在所述样本规则的所述实际可信度大于其对应的所述预设阈值,若是,则根据所述样本规则序列,选择所述实际可信度最高的设定数量个所述样本规则的缺陷成因,得到所述目标诊断结果,若否,则将所述评价因素数据及所述实际焊接缺陷类型输入至所述成因诊断神经网络模型中,并得到所述目标诊断结果。Determine whether there is a sample rule whose actual credibility is greater than its corresponding preset threshold. If so, select a set number of samples with the highest actual credibility based on the sample rule sequence. According to the regular defect causes, the target diagnosis result is obtained. If not, the evaluation factor data and the actual welding defect type are input into the cause diagnosis neural network model, and the target diagnosis result is obtained.

在本实施例中,将上述三个实际可信度与每个规则的预设阈值λ进行比较,可以得到规则1的综合可信度λg1=0.9386是大于阈值λ=0.88的,其余两条规则的λg小于λ,故只有规则1激活并使用,最终便可以根据规则1得出,带诊断缺陷的成因可能为气体流量过大并,其可信度为0.9386。In this embodiment, by comparing the above three actual credibility with the preset threshold λ of each rule, it can be obtained that the comprehensive credibility of rule 1 λ g1 = 0.9386 is greater than the threshold λ = 0.88, and the other two The λ g of the rule is smaller than λ, so only rule 1 is activated and used. Finally, it can be concluded based on rule 1 that the cause of the diagnostic defect may be excessive gas flow, and its credibility is 0.9386.

可以理解的是,本实施例中,将每个实际可信度和其对应的规则自身的预设阈值进行比较,实际中也可以统一设置一个相同预设阈值进行比较。当存在有λg≥λ的规则时,表示该规则对应的缺陷成因诊断结果可信,当所有规则检索完毕后,若存在多个模糊诊断规则的实际可信度均大于预设阈值,那么可以从中选取设定数量个(例如三个)模糊诊断规则,均作为最终的诊断结果。It can be understood that in this embodiment, each actual credibility is compared with the preset threshold of its corresponding rule itself. In practice, the same preset threshold can also be set uniformly for comparison. When there is a rule with λ g ≥ λ, it means that the defect cause diagnosis result corresponding to the rule is credible. After all the rules are retrieved, if there are multiple fuzzy diagnosis rules whose actual credibility is greater than the preset threshold, then it can Select a set number (for example, three) of fuzzy diagnosis rules from them and use them as the final diagnosis results.

而当所有规则的综合可信度λg都小于阈值λ时,表示现有的模糊诊断规则均不可信,则可以进一步选择神经网络模型进行推理。将输入特征归一化后导入模型中,利用训练得到的成因诊断神经网络模型进行推理,网络模型将以特定的形式(例如各个缺陷成因的概率)输出一个合理的焊接缺陷成因,再由用户对模型输出结果进行评价,最终得到缺陷成因诊断方案或模型修正报告。When the comprehensive credibility λg of all rules is less than the threshold λ, it means that the existing fuzzy diagnosis rules are not credible, and the neural network model can be further selected for reasoning. The input features are normalized and imported into the model, and the trained cause diagnosis neural network model is used for reasoning. The network model will output a reasonable cause of welding defects in a specific form (such as the probability of each defect cause), and then the user will The model output results are evaluated, and finally a defect cause diagnosis plan or a model correction report is obtained.

为了验证实际生产中上述方法的应用效果,本发明随机在企业罐体生产中选择5条测试样本,测试样本如下表所示。In order to verify the application effect of the above method in actual production, the present invention randomly selected 5 test samples in the enterprise's tank production. The test samples are shown in the table below.

测试样本test sample

试验中,系统对于样本2到样本5均根据模糊规则给出了推理的结果,如下表所示,其中缺陷成因真实值即为实际获取的前文中的评价因素数据,规则推理可信度即为前文中的实际可信度:During the test, the system gave inference results based on fuzzy rules for Samples 2 to 5, as shown in the table below. The true value of the defect cause is the actually obtained evaluation factor data in the previous article, and the credibility of the rule inference is Actual credibility in the previous article:

缺陷成因真实值及规则推理结果True value of defect cause and rule inference result

而对于样本1则存在规则综合可信度λg低于预设阈值λ的情况,因而采用成因诊断神经网络模型进行辅助推理,缺陷成因真实值及网络输出结果如下表所示:For sample 1, there is a situation where the comprehensive credibility of the rule λ g is lower than the preset threshold λ, so the cause diagnosis neural network model is used for auxiliary reasoning. The true value of the defect cause and the network output results are shown in the following table:

缺陷成因真实值及模型输出结果Actual values of defect causes and model output results

以企业中铝合金焊接气孔缺陷(样本1)诊断为例进行测试,可以看出,经过基于动态权重的自适应PSO-BP神经网络模型的辅助诊断,推理出输入的气孔缺陷有99.51%的可能性是由焊接速度过大造成的,有0.38%的可能性是由气体流量过大造成的,有0.11%的可能性是由气体流量过小造成的。Taking the diagnosis of aluminum alloy welding pore defects (sample 1) in the enterprise as an example for testing, it can be seen that through the assisted diagnosis of the adaptive PSO-BP neural network model based on dynamic weights, it is inferred that the input pore defects are 99.51% likely The problem is caused by excessive welding speed, 0.38% possibility is caused by excessive gas flow, and 0.11% possibility is caused by too small gas flow.

为了更好实施本发明实施例中的焊接缺陷成因诊断方法,在焊接缺陷成因诊断方法基础之上,对应的,请参阅图5,图5为本发明提供的焊接缺陷成因诊断系统的一实施例的结构示意图,本发明实施例提供的一种焊接缺陷成因诊断系统500,包括:In order to better implement the welding defect cause diagnosis method in the embodiment of the present invention, based on the welding defect cause diagnosis method, correspondingly, please refer to Figure 5. Figure 5 is an embodiment of the welding defect cause diagnosis system provided by the present invention. The structural schematic diagram of a welding defect cause diagnosis system 500 provided by an embodiment of the present invention includes:

规则建立模块510,用于确定评价因素和缺陷成因,基于扩展前项的模糊规则建立用于表征所述评价因素和所述缺陷成因之间模糊关系的多个模糊诊断规则;The rule establishment module 510 is used to determine evaluation factors and defect causes, and establish multiple fuzzy diagnostic rules for characterizing the fuzzy relationship between the evaluation factors and the defect causes based on the fuzzy rules of the extended preceding term;

网络建立模块520,用建立成因诊断神经网络模型,所述成因诊断神经网络模型的输入参数包括焊接缺陷类型和所述评价因素,所述成因诊断神经网络模型的输出参数包括诊断结果;The network establishment module 520 is used to establish a cause diagnosis neural network model. The input parameters of the cause diagnosis neural network model include welding defect types and the evaluation factors, and the output parameters of the cause diagnosis neural network model include diagnosis results;

数据获取模块530,用于获取所述待诊断缺陷对应的实际焊接缺陷类型和评价因素数据;The data acquisition module 530 is used to obtain the actual welding defect type and evaluation factor data corresponding to the defect to be diagnosed;

模糊推理模块540,用于基于所述评价因素数据,从多个所述模糊诊断规则中选择出匹配的模糊诊断规则作为样本规则,并对所述样本规则进行模糊推理,得到每个所述样本规则的实际可信度;The fuzzy inference module 540 is configured to select a matching fuzzy diagnostic rule as a sample rule from a plurality of the fuzzy diagnostic rules based on the evaluation factor data, and perform fuzzy inference on the sample rule to obtain each of the samples. the actual credibility of the rules;

结果诊断模块550,用于判断是否存在所述实际可信度大于预设阈值的所述样本规则,若是,则根据所述实际可信度大于所述预设阈值的所述样本规则的缺陷成因,得到目标诊断结果,若否,则根据所述神经网络模型,得到目标诊断结果。The result diagnosis module 550 is used to determine whether there is a sample rule whose actual credibility is greater than a preset threshold. If so, determine the defect causes of the sample rule based on the actual credibility greater than the preset threshold. , obtain the target diagnosis result, if not, obtain the target diagnosis result according to the neural network model.

这里需要说明的是:上述实施例提供的对应的系统500可实现上述各方法实施例中描述的技术方案,上述各模块或单元具体实现的原理可参见上述方法实施例中的相应内容,此处不再赘述。It should be noted here that the corresponding system 500 provided by the above embodiments can implement the technical solutions described in the above method embodiments. The specific implementation principles of each of the above modules or units can be found in the corresponding content in the above method embodiments. Here No longer.

此外,本发明还提供一种焊接缺陷成因诊断系统的实施例,所述系统包括:In addition, the present invention also provides an embodiment of a welding defect cause diagnosis system, which system includes:

数据库模块:对焊接所需的材料、工艺及缺陷识别特征进行数据的检索和查询的功能,节省了资料的储存成本与查询资料的时间成本。同时,赋予系统管理人员权限使其能够在系统内进行数据的增减与维护;Database module: The function of retrieving and querying data on materials, processes and defect identification features required for welding saves the cost of data storage and the time cost of querying data. At the same time, system administrators are given authority to add, delete, and maintain data within the system;

缺陷识别模块:用户可以在系统中上传X射线底片,系统将采用超分辨率重构的卷积神经网络对X射线底片进行识别,以获取焊接缺陷的相关特征,如缺陷类型、面积、长宽比等;Defect identification module: Users can upload X-ray films to the system, and the system will use super-resolution reconstructed convolutional neural networks to identify the X-ray films to obtain relevant characteristics of welding defects, such as defect type, area, length and width ratio;

缺陷成因诊断模块:结合数据库中数据及缺陷识别特征,对焊接缺陷进行成因诊断,系统将利用本文所述焊接缺陷成因诊断方法,确定置信度最高的焊接缺陷成因;Defect cause diagnosis module: Combine the data in the database and defect identification features to diagnose the cause of welding defects. The system will use the welding defect cause diagnosis method described in this article to determine the cause of the welding defect with the highest confidence;

工艺优化模块:本文所设计的系统包括两种优化方式,模式一从缺陷成因诊断层面出发,在得出缺陷成因后,根据缺陷成因来给出工艺优化方案,得到无缺陷的焊缝;模式二从焊缝性能出发,利用多目标粒子群算法(MOPSO)对焊缝性能进行多目标优化,通过对工艺参数的调控得到满足工业需求的焊缝性能指标;Process optimization module: The system designed in this article includes two optimization methods. Mode 1 starts from the defect cause diagnosis level. After the cause of the defect is found, a process optimization plan is given based on the cause of the defect to obtain a defect-free weld; Mode 2 Starting from the welding seam performance, the multi-objective particle swarm algorithm (MOPSO) is used to perform multi-objective optimization of the welding seam performance, and the welding seam performance indicators that meet industrial needs are obtained by regulating the process parameters;

用户权限管理模块:为了数据库的安全性,将用户权限分为系统管理员、系统操作员与普通用户。系统管理员可以使用用户权限管理模块对系统内所有用户赋予相关权限;系统操作员可以对数据库进行增减和维护操作;普通用户仅能对数据库进行检索和查阅,无法对数据库进行其他操作。User rights management module: For the security of the database, user rights are divided into system administrators, system operators and ordinary users. System administrators can use the user rights management module to grant relevant permissions to all users in the system; system operators can add, delete, and maintain the database; ordinary users can only search and consult the database, but cannot perform other operations on the database.

进一步的,请参阅图6,图6为本发明实施例提供的电子设备的结构示意图。基于上述焊接缺陷成因诊断方法,本发明还相应提供了一种焊接缺陷成因诊断设备600,即上述电子设备,焊接缺陷成因诊断设备600可以是移动终端、桌上型计算机、笔记本、掌上电脑及服务器等计算设备。该焊接缺陷成因诊断设备600包括处理器610、存储器620及显示器630。图6仅示出了焊接缺陷成因诊断设备的部分组件,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。Further, please refer to FIG. 6 , which is a schematic structural diagram of an electronic device according to an embodiment of the present invention. Based on the above welding defect cause diagnosis method, the present invention also provides a welding defect cause diagnosis equipment 600, that is, the above-mentioned electronic device. The welding defect cause diagnosis equipment 600 can be a mobile terminal, a desktop computer, a notebook, a palmtop computer, and a server. and other computing equipment. The welding defect cause diagnosis equipment 600 includes a processor 610, a memory 620 and a display 630. FIG. 6 only shows some components of the welding defect cause diagnosis equipment, but it should be understood that implementation of all the components shown is not required, and more or less components may be implemented instead.

存储器620在一些实施例中可以是焊接缺陷成因诊断设备600的内部存储单元,例如焊接缺陷成因诊断设备600的硬盘或内存。存储器620在另一些实施例中也可以是焊接缺陷成因诊断设备600的外部存储设备,例如焊接缺陷成因诊断设备600上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,存储器620还可以既包括焊接缺陷成因诊断设备600的内部存储单元也包括外部存储设备。存储器620用于存储安装于焊接缺陷成因诊断设备600的应用软件及各类数据,例如安装焊接缺陷成因诊断设备600的程序代码等。存储器620还可以用于暂时地存储已经输出或者将要输出的数据。在一实施例中,存储器620上存储有焊接缺陷成因诊断程序640,该焊接缺陷成因诊断程序640可被处理器610所执行,从而实现本申请各实施例的焊接缺陷成因诊断方法。In some embodiments, the memory 620 may be an internal storage unit of the welding defect cause diagnosis device 600 , such as a hard disk or memory of the welding defect cause diagnosis device 600 . In other embodiments, the memory 620 may also be an external storage device of the welding defect cause diagnosis device 600 , such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), or a secure digital device equipped on the welding defect cause diagnosis device 600 . (Secure Digital, SD) card, Flash Card, etc. Further, the memory 620 may also include both an internal storage unit of the welding defect cause diagnosis device 600 and an external storage device. The memory 620 is used to store application software and various data installed in the welding defect cause diagnosis equipment 600 , such as program codes for installing the welding defect cause diagnosis equipment 600 . The memory 620 may also be used to temporarily store data that has been output or is to be output. In one embodiment, a welding defect cause diagnosis program 640 is stored in the memory 620, and the welding defect cause diagnosis program 640 can be executed by the processor 610, thereby implementing the welding defect cause diagnosis methods in various embodiments of the present application.

处理器610在一些实施例中可以是一中央处理器(Central Processing Unit,CPU),微处理器或其他数据处理芯片,用于运行存储器620中存储的程序代码或处理数据,例如执行焊接缺陷成因诊断方法等。In some embodiments, the processor 610 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run program codes or process data stored in the memory 620, for example, to perform welding defect causation. Diagnostic methods, etc.

显示器630在一些实施例中可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。显示器630用于显示在焊接缺陷成因诊断设备600的信息以及用于显示可视化的用户界面。焊接缺陷成因诊断设备600的部件610-630通过系统总线相互通信。In some embodiments, the display 630 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc. The display 630 is used to display information on the welding defect cause diagnosis device 600 and to display a visual user interface. The components 610 - 630 of the welding defect cause diagnosis apparatus 600 communicate with each other through the system bus.

在一实施例中,当处理器610执行存储器620中焊接缺陷成因诊断程序640时实现如上的焊接缺陷成因诊断方法中的步骤。In one embodiment, when the processor 610 executes the welding defect cause diagnosis program 640 in the memory 620, the above steps in the welding defect cause diagnosis method are implemented.

本发明提供的一种焊接缺陷成因诊断方法、系统及电子设备,其中方法通过建立模糊诊断规则及成因诊断神经网络数据库,并将二者结合起来共同进行焊接缺陷的诊断,具体地,其先基于传统的模糊规进行了前项扩展并加入了阈值,用从模糊诊断规则中选择出来的样本规则进行模糊推理,若存在实际可信度大于预设阈值的样本规则,则可以根据该样本规则得到目标诊断结果,若不存在,则可以认为现有的模糊诊断规则无法处理现有事实,此时利用成因诊断神经网络进行补充处理,便可以得到理想的目标诊断结果。相比于现有技术,本发明将模糊规则和神经网络两种理论相结合,使诊断过程即具备模糊推理能够处理不确定性知识的优点,也具备神经网络自学习、高效高精度的优点,极大地提高了推理过程的可靠性,相比于传统的模糊神经网络模型,更加适用于焊接这种多影响因素的场景。The invention provides a welding defect cause diagnosis method, system and electronic equipment. The method establishes fuzzy diagnosis rules and cause diagnosis neural network databases, and combines the two to jointly diagnose welding defects. Specifically, it is first based on The traditional fuzzy rule expands the previous item and adds a threshold. The sample rules selected from the fuzzy diagnostic rules are used for fuzzy inference. If there is a sample rule whose actual credibility is greater than the preset threshold, it can be obtained based on the sample rule. If the target diagnosis result does not exist, it can be considered that the existing fuzzy diagnosis rules cannot handle the existing facts. At this time, using the cause diagnosis neural network for supplementary processing, the ideal target diagnosis result can be obtained. Compared with the existing technology, the present invention combines fuzzy rules and neural network theories, so that the diagnosis process not only has the advantages of fuzzy reasoning that can handle uncertain knowledge, but also has the advantages of neural network self-learning, high efficiency and high accuracy. It greatly improves the reliability of the reasoning process. Compared with the traditional fuzzy neural network model, it is more suitable for scenarios with multiple influencing factors such as welding.

以上所述,仅为本发明较佳的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。The above are only preferred specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person familiar with the technical field can easily think of changes or modifications within the technical scope disclosed in the present invention. All substitutions are within the scope of the present invention.

Claims (7)

1. A welding defect cause diagnosis method, comprising:
determining an evaluation factor and a defect cause, and establishing a plurality of fuzzy diagnosis rules for representing fuzzy relations between the evaluation factor and the defect cause based on fuzzy rules of an expansion front;
establishing a cause diagnosis neural network model, wherein input parameters of the cause diagnosis neural network model comprise welding defect types and evaluation factors, and output parameters of the cause diagnosis neural network model comprise diagnosis results;
acquiring actual welding defect type and evaluation factor data corresponding to defects to be diagnosed;
based on the evaluation factor data, selecting a matched fuzzy diagnosis rule from a plurality of fuzzy diagnosis rules as a sample rule, and performing fuzzy reasoning on the sample rule to obtain the actual credibility of each sample rule;
Judging whether the sample rule with the actual credibility larger than a preset threshold exists or not, if so, obtaining a target diagnosis result according to the defect cause of the sample rule with the actual credibility larger than the preset threshold, and if not, obtaining the target diagnosis result according to the cause diagnosis neural network model;
wherein the determining the evaluation factor and the defect cause, establishing a plurality of fuzzy diagnosis rules for representing fuzzy relations between the evaluation factor and the defect cause based on the fuzzy rules of the expansion foreterm, comprises the following steps:
establishing a welding characteristic information base, and obtaining the evaluation factors and the defect causes according to the welding characteristic information base;
establishing a plurality of fuzzy diagnosis rules based on fuzzy rules of the extension antecedents according to the evaluation factors;
each fuzzy diagnosis rule comprises a front term, a rear term, theoretical credibility and the preset threshold value, wherein the front term comprises a plurality of evaluation factors, and the rear term comprises the defect cause;
the fuzzy diagnosis rule is designed by adopting a C-F model based on the fuzzy rule, and the antecedents of the fuzzy diagnosis rule are expanded, so that the membership degree of each condition is increased;
The step of selecting a matched fuzzy diagnosis rule from a plurality of fuzzy diagnosis rules as a sample rule based on the evaluation factor data, and performing fuzzy reasoning on the sample rule to obtain the actual credibility of each sample rule, wherein the step of obtaining the actual credibility of each sample rule comprises the following steps:
selecting a matched fuzzy diagnosis rule from a plurality of diagnosis rules as the sample rule based on the evaluation factor data;
according to the actual welding defect type, obtaining a weight coefficient of each evaluation factor for the actual welding defect type based on an analytic hierarchy process;
obtaining the membership degree of each evaluation factor in the sample rule according to the evaluation factor data;
and calculating the actual credibility of each sample rule according to the weight coefficient and the membership degree.
2. The welding defect cause diagnosis method according to claim 1, wherein the obtaining a weight coefficient of each evaluation factor for the actual welding defect type based on a hierarchical analysis method according to the actual welding defect type comprises:
establishing a pair comparison matrix of the evaluation factors according to the actual welding defect type;
Consistency test is carried out on the paired comparison matrixes, and the paired comparison matrixes are adjusted according to test results;
obtaining the feature vector of the pair of adjusted comparison matrixes according to the pair of adjusted comparison matrixes;
and normalizing the feature vector to obtain a weight coefficient of each evaluation factor for the actual welding defect type.
3. The method according to claim 1, wherein the determining whether the sample rule having the actual reliability greater than the preset threshold exists, if so, obtaining a target diagnosis result according to a defect cause of the sample rule having the actual reliability greater than the preset threshold, and if not, obtaining a target diagnosis result according to the cause diagnosis neural network model, includes:
sequencing the sample rule according to the numerical value of the actual credibility to obtain a sample rule sequence;
judging whether the actual credibility of the sample rule is larger than the corresponding preset threshold value, if so, selecting the defect causes of the set number of the sample rules with the highest actual credibility according to the sample rule sequence to obtain the target diagnosis result, and if not, inputting the evaluation factor data and the actual welding defect type into the cause diagnosis neural network model to obtain the target diagnosis result.
4. The welding defect cause diagnosis method according to claim 1, wherein the establishing a cause diagnosis neural network model includes:
establishing an initial BP neural network model, wherein the input parameters of the initial BP neural network model comprise a plurality of evaluation factors, and the output parameters of the initial BP neural network model comprise the diagnosis results;
acquiring initial parameters of the initial BP neural network model, and optimizing through a PSO-BP algorithm to obtain optimized parameters;
and optimizing the initial BP neural network model according to the optimization parameters to obtain the causal diagnosis neural network model.
5. The welding defect cause diagnosis method according to claim 4, wherein the obtaining initial parameters of the initial BP neural network model and optimizing by a PSO-BP algorithm to obtain optimized parameters comprises:
acquiring initial parameters of the initial BP neural network model, wherein the initial parameters comprise weights, thresholds and loss functions of neurons;
establishing a solution space and a particle population according to the weight and the threshold of the neuron, and initializing the position of the particle population in the solution space;
Establishing an adaptability function according to the loss function;
optimizing the position of the particle population in the solution space according to the fitness function;
and acquiring the position of the optimized particle population in the solution space to obtain the optimization parameters.
6. A welding defect cause diagnosis system, comprising:
the rule establishing module is used for determining an evaluation factor and a defect cause, and establishing a plurality of fuzzy diagnosis rules for representing fuzzy relations between the evaluation factor and the defect cause based on fuzzy rules of an expansion front term;
the network establishment module is used for establishing a cause diagnosis neural network model, wherein the input parameters of the cause diagnosis neural network model comprise welding defect types and evaluation factors, and the output parameters of the cause diagnosis neural network model comprise diagnosis results;
the data acquisition module is used for acquiring the actual welding defect type and evaluation factor data corresponding to the defect to be diagnosed;
the fuzzy reasoning module is used for selecting a matched fuzzy diagnosis rule from a plurality of fuzzy diagnosis rules as a sample rule based on the evaluation factor data, and carrying out fuzzy reasoning on the sample rule to obtain the actual credibility of each sample rule;
The result diagnosis module is used for judging whether the sample rule with the actual credibility being larger than a preset threshold exists or not, if yes, obtaining a target diagnosis result according to the defect cause of the sample rule with the actual credibility being larger than the preset threshold, and if not, obtaining the target diagnosis result according to the neural network model;
wherein the determining the evaluation factor and the defect cause, establishing a plurality of fuzzy diagnosis rules for representing fuzzy relations between the evaluation factor and the defect cause based on the fuzzy rules of the expansion foreterm, comprises the following steps:
establishing a welding characteristic information base, and obtaining the evaluation factors and the defect causes according to the welding characteristic information base;
establishing a plurality of fuzzy diagnosis rules based on fuzzy rules of the extension antecedents according to the evaluation factors;
each fuzzy diagnosis rule comprises a front term, a rear term, theoretical credibility and the preset threshold value, wherein the front term comprises a plurality of evaluation factors, and the rear term comprises the defect cause;
the fuzzy diagnosis rule is designed by adopting a C-F model based on the fuzzy rule, and the antecedents of the fuzzy diagnosis rule are expanded, so that the membership degree of each condition is increased;
The step of selecting a matched fuzzy diagnosis rule from a plurality of fuzzy diagnosis rules as a sample rule based on the evaluation factor data, and performing fuzzy reasoning on the sample rule to obtain the actual credibility of each sample rule, wherein the step of obtaining the actual credibility of each sample rule comprises the following steps:
selecting a matched fuzzy diagnosis rule from a plurality of diagnosis rules as the sample rule based on the evaluation factor data;
according to the actual welding defect type, obtaining a weight coefficient of each evaluation factor for the actual welding defect type based on an analytic hierarchy process;
obtaining the membership degree of each evaluation factor in the sample rule according to the evaluation factor data;
and calculating the actual credibility of each sample rule according to the weight coefficient and the membership degree.
7. An electronic device comprising a memory and a processor, wherein,
the memory is used for storing programs;
the processor, coupled to the memory, is configured to execute the program stored in the memory to implement the steps in the welding defect cause diagnosis method according to any one of the preceding claims 1 to 5.
CN202211323505.2A 2022-10-27 2022-10-27 Welding defect cause diagnosis method and system and electronic equipment Active CN115563549B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211323505.2A CN115563549B (en) 2022-10-27 2022-10-27 Welding defect cause diagnosis method and system and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211323505.2A CN115563549B (en) 2022-10-27 2022-10-27 Welding defect cause diagnosis method and system and electronic equipment

Publications (2)

Publication Number Publication Date
CN115563549A CN115563549A (en) 2023-01-03
CN115563549B true CN115563549B (en) 2023-10-20

Family

ID=84769177

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211323505.2A Active CN115563549B (en) 2022-10-27 2022-10-27 Welding defect cause diagnosis method and system and electronic equipment

Country Status (1)

Country Link
CN (1) CN115563549B (en)

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5544256A (en) * 1993-10-22 1996-08-06 International Business Machines Corporation Automated defect classification system
US5591355A (en) * 1994-02-25 1997-01-07 Miyachi Technos Corporation Method for controlling resistance welding using fuzzy reasoning
KR20040088896A (en) * 2003-04-14 2004-10-20 기아자동차주식회사 Arc welding network system
WO2005071582A2 (en) * 2004-01-27 2005-08-04 British Telecommunications Public Limited Company Detection of abnormal behaviour in dynamic systems
CN102436524A (en) * 2011-10-19 2012-05-02 清华大学 Fuzzy reasoning method for soft fault diagnosis for analog circuit
CN103091112A (en) * 2013-01-31 2013-05-08 林惠堂 Method and device of car emission fault detection and diagnosis based on fuzzy reasoning and self-learning
CN105787563A (en) * 2014-12-18 2016-07-20 中国科学院沈阳自动化研究所 Self-learning mechanism-base fast matching fuzzy reasoning method
CN106909727A (en) * 2017-02-20 2017-06-30 武汉理工大学 Laser welding temperature field Finite Element Method based on BP neural network and Genetic Algorithms
CN106919982A (en) * 2017-03-20 2017-07-04 中国科学院沈阳自动化研究所 A kind of method for diagnosing faults towards semiconductor manufacturing equipment
CN106961249A (en) * 2017-03-17 2017-07-18 广西大学 A kind of diagnosing failure of photovoltaic array and method for early warning
CN108205727A (en) * 2016-12-20 2018-06-26 中国科学院沈阳自动化研究所 A kind of digitlization plant process decision-making technique based on decision tree and expert system
CN109491816A (en) * 2018-10-19 2019-03-19 中国船舶重工集团公司第七六研究所 Knowledge based engineering method for diagnosing faults
CN112068542A (en) * 2020-06-30 2020-12-11 武汉乐庭软件技术有限公司 Automatic driving behavior planning method based on fuzzy control
CN112101597A (en) * 2020-10-14 2020-12-18 辽宁电能发展股份有限公司 Electric vehicle rental operation platform vehicle fault prediction system, method and device
CN113139514A (en) * 2021-05-14 2021-07-20 安徽三禾一信息科技有限公司 Hydraulic system fault diagnosis method based on fuzzy neural network
CN114184367A (en) * 2021-11-29 2022-03-15 北京唐智科技发展有限公司 Fault diagnosis method, device and equipment for rotary mechanical equipment and readable storage medium
CN114361536A (en) * 2022-03-18 2022-04-15 北汽福田汽车股份有限公司 Fault processing method and device for fuel cell system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101491196B1 (en) * 2007-08-03 2015-02-06 스마트시그널 코포레이션 Fuzzy classification approach to fault pattern matching

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5544256A (en) * 1993-10-22 1996-08-06 International Business Machines Corporation Automated defect classification system
US5591355A (en) * 1994-02-25 1997-01-07 Miyachi Technos Corporation Method for controlling resistance welding using fuzzy reasoning
KR20040088896A (en) * 2003-04-14 2004-10-20 기아자동차주식회사 Arc welding network system
WO2005071582A2 (en) * 2004-01-27 2005-08-04 British Telecommunications Public Limited Company Detection of abnormal behaviour in dynamic systems
CN102436524A (en) * 2011-10-19 2012-05-02 清华大学 Fuzzy reasoning method for soft fault diagnosis for analog circuit
CN103091112A (en) * 2013-01-31 2013-05-08 林惠堂 Method and device of car emission fault detection and diagnosis based on fuzzy reasoning and self-learning
CN105787563A (en) * 2014-12-18 2016-07-20 中国科学院沈阳自动化研究所 Self-learning mechanism-base fast matching fuzzy reasoning method
CN108205727A (en) * 2016-12-20 2018-06-26 中国科学院沈阳自动化研究所 A kind of digitlization plant process decision-making technique based on decision tree and expert system
CN106909727A (en) * 2017-02-20 2017-06-30 武汉理工大学 Laser welding temperature field Finite Element Method based on BP neural network and Genetic Algorithms
CN106961249A (en) * 2017-03-17 2017-07-18 广西大学 A kind of diagnosing failure of photovoltaic array and method for early warning
CN106919982A (en) * 2017-03-20 2017-07-04 中国科学院沈阳自动化研究所 A kind of method for diagnosing faults towards semiconductor manufacturing equipment
CN109491816A (en) * 2018-10-19 2019-03-19 中国船舶重工集团公司第七六研究所 Knowledge based engineering method for diagnosing faults
CN112068542A (en) * 2020-06-30 2020-12-11 武汉乐庭软件技术有限公司 Automatic driving behavior planning method based on fuzzy control
CN112101597A (en) * 2020-10-14 2020-12-18 辽宁电能发展股份有限公司 Electric vehicle rental operation platform vehicle fault prediction system, method and device
CN113139514A (en) * 2021-05-14 2021-07-20 安徽三禾一信息科技有限公司 Hydraulic system fault diagnosis method based on fuzzy neural network
CN114184367A (en) * 2021-11-29 2022-03-15 北京唐智科技发展有限公司 Fault diagnosis method, device and equipment for rotary mechanical equipment and readable storage medium
CN114361536A (en) * 2022-03-18 2022-04-15 北汽福田汽车股份有限公司 Fault processing method and device for fuel cell system

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Essa Alghannam 等.A Novel Method of Using Vision System and Fuzzy Logic for Quality Estimation of Resistance Spot Welding.《symmetry》.2019,1-20. *
吕现彪.模糊关联规则挖掘算法的研究.《中国优秀硕士学位论文全文数据库 信息科技辑》.2017,(第02期),I138-2485. *
梁硼 等.X射线焊缝图像缺陷自动提取与识别技术研究.《中国优秀硕士学位论文全文数据库 信息科技辑》.2013,(第04期),I138-932. *
高昶霖 等.基于动态权重的自适应 PSO-BP 神经网络焊接缺陷成因诊断.《焊接学报》.2022,第43卷(第1期),98-106. *

Also Published As

Publication number Publication date
CN115563549A (en) 2023-01-03

Similar Documents

Publication Publication Date Title
Liu et al. Multi‐layer feature selection incorporating weighted score‐based expert knowledge toward modeling materials with targeted properties
CN109858758A (en) A kind of the combination weighting appraisal procedure and system of distribution network electric energy quality
CN109214708B (en) Electric power system risk assessment method based on cross entropy theory optimization support vector machine
WO2021004324A1 (en) Resource data processing method and apparatus, and computer device and storage medium
CN104598984B (en) A kind of failure prediction method based on fuzzy neural network
CN110222387B (en) Multi-element drilling time sequence prediction method based on mixed leaky integration CRJ network
Yang et al. Evolutionary neural architecture search for transformer in knowledge tracing
CN108898259A (en) Adaptive Evolutionary planning Methods of electric load forecasting and system based on multi-factor comprehensive
CN116307215A (en) Load prediction method, device, equipment and storage medium of power system
CN114969953A (en) Shield underpass tunnel optimization design method and device based on Catboost-NSGA-III
CN116668083A (en) A method and system for detecting network traffic anomalies
CN114678080A (en) Prediction model and construction method of phosphorus content at the end point of converter, and phosphorus content prediction method
CN107295537A (en) A kind of method and system for wireless sensor network reliability of testing and assessing
CN116109004A (en) A method, device, equipment and medium for predicting insulator leakage current
CN113242213A (en) Power communication backbone network node vulnerability diagnosis method
CN113033898A (en) Electrical load prediction method and system based on K-means clustering and BI-LSTM neural network
CN111369078A (en) A method for predicting water quality of water supply based on long short-term memory neural network
CN115563549B (en) Welding defect cause diagnosis method and system and electronic equipment
CN115310355A (en) Multi-load forecasting method and system for integrated energy system considering multi-energy coupling
CN118522369A (en) High-temperature alloy creep life prediction method based on machine learning and symbolic regression
CN116861256A (en) Furnace temperature prediction method, system, equipment and medium for solid waste incineration process
Hu et al. Research on the fault identification method of oil pumping unit based on residual network
CN113111588B (en) NO of gas turbine X Emission concentration prediction method and device
CN114186771B (en) Mixed regularized random configuration network industrial process operation index estimation method
CN115967092A (en) Data-driven non-parameter probability optimal power flow prediction-analysis integrated method for new energy power system

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