# Smart Diagnostic Expert System for Defect in Forging Process by Using Machine Learning Process

Authors: Shivlal Mewada; Anil Saroliya; N. Chandramouli; T. Rajasanthosh Kumar; M. Lakshmi; S. Suma Christal Mary; Mani Jayakumar
Journal: Journal of Nanomaterials
 (2022)

---

## Abstract

Integrating machine learning into one of the manufacturing processes, i.e., forging, is mainly concerned with making the system more intelligent by incorporating them to exhibit global understanding. Sometimes the engineer/operator can find the defects during or after the forging operation. So, the system will need some input to identify the different types of categorized defects. And also, according to that, we will develop the intelligent fault diagnosis process. We should calculate the statistical probability theory. Now, we implement the system which is the structure of the fault analysis system for the forging process. In the structure, we demonstrate the defect of the forged part, use the given imported probability to find the possible causes, and provide some remainders to reduce the fault. For enhancement of feature needs, this work includes more integration of AI with forging.


---

## Body

## 1. Introduction

Forging is a metal forming process involving the shaping of metal using compressive force. This technique will be used in different industries like automobile, aerospace, hand tools and hardware, and machine and equipment. Two forging processes are there: (1) hot forging process and (2) cold forging process.Cold forging is worked at room temperature, but hot forging is needed at more than 1200 Celsius degrees. Simple components are made by cold forging, and the hot forging process makes complex parts. In both cases, problem analysis is more difficult due to different conditions. It is the main moto to work on this. The experts or operators can identify the problem using previous information or destructive testing after production. Optimizing the production of forged parts requires solving all the related defects. So we developed a diagnostic system to be used by engineers or operators to detect the cause of any defect or background information of the product [1–3].Artificial Intelligence (AI) is the new operation technique to interchange data with human thinking, and it can understand that human sense [4]. It gives an intelligent machine or intelligent process as a product, and also it will respond to any problem like a human [5].Continuous development toward automation and intelligent machines awaits the mechanical engineer. Mechanical and electrical engineering will be combined with artificial intelligence in a new way. Artificial intelligence is mostly used to regulate automated mechanical engineering [6]. AI is now being used to identify forging errors. In general, an AI-based defect detection system uses rule-based reasoning, case-based reasoning, and fault-based diagnosis as its primary diagnostic methods of analysis [1]. The defect diagnostic system will build an expert knowledge system based on the provided data [7]. Rules for fault diagnosis are needed in the database, as are the knowledge processing tools of the interpreter diagnostic system, the learning system, and the man-machine interface expert system [8].


## 2. Problem Statement

At any time, operator/engineers find faults during/after the operation/process and guess when, how, and why the mark appears. At some time, they need some information to predict the reason for the fault, type of part, defect location on the component/part, depth of the defect, etc [3, 9]. More information may help estimate the correct cause. Figure 1 represents the basic flow system to identify the defect [10].Figure 1
Basic flowchart for diagnosis system.The process needs some inputs to find the defect.(1)
part type(2)
location of defect(3)
procedure (combination of strategy and stage of deficiency)(4)
defect property (defect is open/closed, depth)(5)
the batch size which includes the defectsNow, we develop the step by step to detect the defect any circumference of the forging process.Step 1. Categorize the defect [11–13]:
(1)
Melting practice: slag, blow holes, etc(2)
Ingot: piping, cracks, and scale surface roughness(3)
Improper heating: burnt metal, decarburization, and flakes(4)
Improper forging: seams, cracks, and laps(5)
forging design(6)
die design(7)
material defect: imperfect material is usedStep 2. Qualitative AnalysisTheoretical and empirical relations were used to calculate the probability of each outcome. It will develop in Section3 [14–16].Step 3. Develop fault diagnostic system.It will give a good analysis of causes of forging. Figure2 represents the identification of defect in forging process [17, 18].Figure 2
Development of fault tree forging process.Step 4. Development and implementation:We need to establish the overall structure of the expert system, implement the knowledge base, and debug the system (In Section4) [19–21].


## 3. Quantitative Analysis-Mathematical Modelling

For example, consider a forged part,Type of element:X (say).Defect category:Y (Say at defect may).Final decision is that: The parts have some defect.In the above part, we cannot find exact decision, becausePei be the probability then dj be the decision number j. Pei/dj will represent the maximum probability of ei in the case that dj is evident.It may express(1)Peidj=peipdj/ei∑i=1npeipdj/ei.Now, we add one more decision here.Decision 2: The element also has some defect on a part. This fact also supports the assumption that some fault is detected.(2)pd1,d2e1=pd1d2,eipd2d1.Ifd1 depends on d2, then
(3)pd1,d2e1=pd1e1pd2e1.By applying the above condition to the first equation,(4)pe1d1,d2=pe1pd1/e1pd2/e1∑i=1npe1pd1/e1pd2/e1.Now, we increase this type of equations which are independent on each other.Then,(5)pe1d1,d2,−−−−−−−−,dm=pe1pd1/e1−−−−−−−pdm/e1∑i=1npe1pd1/e1−−−−−pdm/e1=pei∑i=1npdj/ei∑i=1npei∑j=1npdj/ei.Now, almost gotdj at every step, i depends on decision j. On the other hand, remaining probabilities may be necessary. However, in some only pei/dj instead of pdj/ei. Hence,
(6)pdjei=Pei/djPei∑i=1npeipdjei.Now, involve a variablev(7)pdjvei=pei/djvpei∑i=1npeipdjvei.LetXiv and Yv be
(8)Xiv=pei/djvpei,Yv=∑i=1npeipdjvei,Now,Pdjv/ei=Xiv.Yv.The above sequence addition should be equal to one, so(9)∑v=11djvei=∑v=11XivYv=1.LetXiv be the matrix
(10)Xiv=X11X12⋯X1v⋮⋮⋮Xn1Xn2⋯Xnk,Yv=Y1Y2⋯Yv,1=11⋯1.From above equations,(11)Xiv.YvT=IvT,YvT=Xiv−1.IvT,Now, we getPdjv/ei from above equations.


## 4. Implementation of Overall System

(1)
The Bayesian methodology is used to find each defect according to the information given as input(2)
Causes and treatment reasoning that use the knowledge-based approach depend on the combination of input information(3)
The output of the system is represented in a graphical manner. In the end, operator or engineer knows the result, they can utilize the supervised machine learning process to get the probability [22–24]The entire implementation system is developed in a flowchart represented in Figure3.Figure 3
Implementation Of overall system.


### 4.1. Expert System and Its Structure

The fault analysis was developed based on the fault analysis represented in Figure4.
(1)
User interface will transfer the data between the user to the system(2)
Target was achieved using a reasoning machine and user input(3)
Interpretation mechanism will interpret the conclusions from the reasoning machine and make them user friendly(4)
Base knowledge has huge rubrics for fault diagnosis in the forging process(5)
Database integration stores the initial inputs, intermediate, and conclusions during the fault diagnosis(6)
Subsystem: It works like a coordinator and works with an expert systemFigure 4
Fault diagnosis system for forging process.


### 4.2. Base Knowledge Development

It mainly focuses on catching the knowledge to generate the decision, solution for a problem, and more. After qualitative and quantitative analyses, we can get the minimum cutset. Every rule is written according to the least cutset. It will generically answer the tricky. Knowledge systems consist of different decision tables and conditions of regulations; all these are implemented by SQL server [25, 26].The decision table stores the theory of faults, including responsibilities and their description [27, 28].The condition of rules is composed of several conditions’ initiation/introduction of the problem, decision description, etc.Condition of rules stores all the simple data like name and need, priority, and number of contents [29].


## 4.1. Expert System and Its Structure

The fault analysis was developed based on the fault analysis represented in Figure4.
(1)
User interface will transfer the data between the user to the system(2)
Target was achieved using a reasoning machine and user input(3)
Interpretation mechanism will interpret the conclusions from the reasoning machine and make them user friendly(4)
Base knowledge has huge rubrics for fault diagnosis in the forging process(5)
Database integration stores the initial inputs, intermediate, and conclusions during the fault diagnosis(6)
Subsystem: It works like a coordinator and works with an expert systemFigure 4
Fault diagnosis system for forging process.


## 4.2. Base Knowledge Development

It mainly focuses on catching the knowledge to generate the decision, solution for a problem, and more. After qualitative and quantitative analyses, we can get the minimum cutset. Every rule is written according to the least cutset. It will generically answer the tricky. Knowledge systems consist of different decision tables and conditions of regulations; all these are implemented by SQL server [25, 26].The decision table stores the theory of faults, including responsibilities and their description [27, 28].The condition of rules is composed of several conditions’ initiation/introduction of the problem, decision description, etc.Condition of rules stores all the simple data like name and need, priority, and number of contents [29].


## 5. Result and Discussion

Here, we execute the developed system; the user goes to the main menu as shown in Figure5. The user is to answer all the input questionnaires for the integrated part.
(1)
part type: crankshaft(2)
location of defect: journal part(3)
procedure (combination of strategy and stage of deficiency): combination of heat treatment and forged(4)
defect property (defect is open/closed, depth): defect is closed and depth is 0.22 mm(5)
the batch size which includes the defects: 20Figure 5
Main menu of the entire system.Now, Figures6 and 7 show the choice of part, process, and property, respectively. For the given example data, we will run the system with a combination of inputs.Figure 6
Choice part menu.Figure 7
Choice board menu.Our developed system (Figure8) makes the decision by the probability table as shown in Figure 9. Push the button “CERTAIN CALCULATION” shown in Figure 10. Our advanced system displays the defect category [20–22].Figure 8
Questions-Defect Property.Figure 9
Table of Probability.Figure 10
Causes and remedy process.Finally, the user may use a system of certainty to conclude based on the empirical relations. It may add the past information and also possibly update the essential parts [23–25].We can conclude the following:(1)
Developed conditional program to remove the complex data. The expanded program is very user-friendly and adaptable to any other application [30, 31](2)
The probability approach allows the possibility of a specific category, which is the most valuable and advantageous to use or evaluator based on the matching diagnosis system concept used by the expert system(3)
The entire process will find the relation of each factor that leads to the diagnosis of the indicated cause(4)
It is pretty simple because it needs to update the basic probability according to the field/experimental data processedThe limitation of work is our entire work system accommodates input information only; these are independent. In some cases, maybe factors are not separate. So, users can develop the method to make it easy.


## 6. Conclusion

The forging system is very suitable for artificial intelligent applications because it needs more of a human expert. This entire concept combined the different knowledge to counter the fault in forging. We construct the system, it will link the field data and engineering design. Graphical type of output was obtained and it is easy to understand. Bayesian interface was used in this research work. The developed formulation and the expert system will diagnose the fault in the manufacturing system, i.e., forging.A fault diagnosis system is proposed, a skeleton of the forging is developed in a fault tree. Analysis of fault tree carried out qualitatively and quantitatively gives the exact fault diagnosis system. Fault diagnosis of forging was developed by “Microsoft SQL Server and Microsoft visual studio”. Finally, diagnosis of the result shows the prepared system with an example.



---

*Source: 2567194-2022-05-23.xml*