# Smart Agent System for Cyber Nano-Manufacturing in Industry 4.0
## 2 Methodology
### ANN-Based Expert System
#### 2.1.4 ANN Algorithm Development  
Due to the variety of nanomanufacturing techniques with similar properties, the decision to choose the appropriate one is complicated for manufacturers [56]. So, the classification of NM processes through the neural network under various criteria influences the decision by narrowing down the selection with high accuracy. In this research, the integration of an ANN with an expert system for nanomanufacturing classification was explored. ANNs are very useful in a wide range of applications, including Data Mining, Text Mining, Signal Filtering, and Robust Pattern Detection, significantly improving their performances compared to the conventional techniques [57]. This system is versatile in operation, performs a broader range of functions compared to a linear program, and is robustly resistant to failure due to its parallel structure. This extremely reduces the processing time, unlike other kinds of algorithms, yet it achieves analogous results. Therefore, the application of ANN can be used successfully to support nanoscale manufacturing. It lowers costs and saves time. It can deal with issues that have a significant amount of data. BPNN is one of the most common classes of training algorithms for Feed-Forward Neural Networks (FFNNs), also called Back Propagation (BP). It is one of the most popular NN methods and has four steps [58]. The BPNN corrects the randomly chosen weights. The four steps are the feed-forward computation, BP to the output layer, BP to the hidden layer, and weight updates. Once the error function becomes very small, the BPNN stops. The BPNN algorithm comes from a relatively simple idea: the output of the NN is evaluated against the expected output. The process is continuously repeated by modifying the connection (weights) between layers until the smallest possible error is obtained [59]. The output is computed by Equations (1)-(4):  
\[O_{i}^{d}=f\left(net_{i}^{d}\right)=f(\sum_{j=1}^{n}W_{ij}V_{j}^{d})=f(\sum_{j =1}^{n}(W_{ij}.f)\left(\sum_{k=1}^{m}w_{jk}x_{k}^{d}\right)) \tag{1}\]  
\[net_{j}^{d}=\sum_{k=1}^{m}w_{jk}x_{k}^{d} \tag{2}\] \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline \multirow{2}{*}{**Set**} & \multirow{2}{*}{**Cost**} & \multirow{2}{*}{**Pattern**} & \multirow{2}{*}{**Aspect**} & \multirow{2}{*}{**Feature**} & \multirow{2}{*}{**Process**} & \multirow{2}{*}{**Material**} & \multirow{2}{*}{**Nano-Process**} & \multirow{2}{*}{**Nano-Process**} \\  & & & & & & & & & \\ \hline
1 & 1 & 2 & 8 & 12 & 2 & 4 & NIL & 2 \\ \hline
2 & 1 & 2 & 8 & 6 & 3 & 1 & NIL & 2 \\ \hline
3 & 1 & 1 & 2 & 34 & 1 & 4 & SA & 5 \\ \hline
4 & 2 & 2 & 2 & 7 & 1 & 5 & PLD & 4 \\ \hline
5 & 2 & 2 & 2 & 511 & 3 & 4 & PHO & 3 \\ \hline
6 & 3 & 2 & 2 & 10 & 1 & 3 & PLD & 4 \\ \hline
7 & 1 & 2 & 2 & 567 & 3 & 4 & PHO & 3 \\ \hline
8 & 2 & 2 & 9 & 6 & 2 & 3 & NIL & 2 \\ \hline
9 & 2 & 2 & 10 & 20 & 2 & 2 & NIL & 2 \\ \hline
10 & 2 & 2 & 2 & 14 & 1 & 3 & PLD & 4 \\ \hline
11 & 3 & 2 & 1 & 5 & 1 & 2 & DPN & 1 \\ \hline
12 & 1 & 2 & 3 & 591 & 3 & 1 & PHO & 3 \\ \hline
13 & 2 & 3 & 8 & 15 & 2 & 3 & NIL & 2 \\ \hline
14 & 1 & 2 & 3 & 516 & 3 & 2 & PHO & 3 \\ \hline
15 & 1 & 1 & 1 & 30 & 1 & 2 & SA & 5 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Data Sheet for the input dataset for ANN. \[V_{j}^{d}=f\bigg{(}net_{j}^{d}\bigg{)}=f\bigg{(}\sum_{k=1}^{m}w_{jk}x_{k}^{d}\bigg{)} \tag{3}\]  
\[net_{i}^{d}=\sum_{j=1}^{n}W_{ij}V_{j}^{d}=\sum_{j=1}^{n}(W_{ij}.f\bigg{(}\sum_{k =1}^{m}w_{jk}x_{k}^{d}\bigg{)}\bigg{)} \tag{4}\]  
where \(n\) is the number of inputs, \(m\) is the number of hidden layer neurons, \(d\) is the dimensional space, and \(W_{jk}\) is the weight between neurons \(j\) and \(k\). Probabilistic Neural Networks (PNNs) are the second algorithm that consist of 3 layers of neurons (nodes). The input layer consists of nodes (features). The hidden layer receives the features from the input layer. The third one is the output layer. PNN requires no time to train, and it is sensitive to outliers, so it can generate probability scores and approach Bayes optimal [48].