# Optimization of Intelligent Maintenance System in Smart Factory Using State Space Search Algorithm
### Literature Review on Available Solutions
#### 1.1.4 Failure Mode and Effects Analysis (FMEA)  
Failures of mechanical or electrical components can lead to significant operational losses in a smart factory, as well as serious safety concerns. Rotating mechanical elements are particularly susceptible to mechanical failure due to fatigue stress incurred during operation. Therefore, effective and accurate defect detection and diagnosis are crucial. Not only does accurate detection and diagnosis enhance production efficiency, but it also ensures optimal machine performance. Additionally, improvements in the reliability and safety of machine operations can be achieved, and the transfer learning problem for machine fault diagnosis can be assessed using the distribution discrepancy metric equation [23]:  
Let  
\[\text{Ds}\ =\ \big{\{}\left(\textbf{x}_{i}^{\textbf{s}},\textbf{y}_{i}^{\textbf{ s}}\right)\big{\}}n_{i=1}^{t} \tag{20}\]  
\[Dt=\Big{\{}\left(\textbf{x}_{i}^{\textbf{t}},\textbf{y}_{i}^{\textbf{t}} \right)\Big{\}}n_{i=1}^{t}\text{ where }x_{i}^{t}\mathcal{E}\ R_{i}^{tMt} \tag{21}\]where Mt represents the target data, \(n_{i}^{t}\) represents the system condition, and \(n_{t}\) represents the target sample \(\mathcal{E}\).  
Additionally, there are research studies on fault diagnosis that apply advanced techniques. For example, in the industry, modern techniques have been implemented for the fault diagnosis of centrifugal pumps (CPs) using wavelet coherence analysis (WCA) and deep learning (DL). The proposed method demonstrates higher accuracy in fault identification compared to existing techniques when tested on real-world industrial CP vibration signals [24] and a study of an innovative approach for pipeline leakage detection using acoustic emission (AE) signaling technology combined with time-series deep learning algorithms. This research enhances pipeline leakage detection technology, improving accuracy and reliability in identifying pipeline integrity issues [25].  
The most popular tool in the industry today is failure mode and effects analysis (FMEA), as shown in Figure 10.  
FMEA is a tool utilized within the QS 9000 system to analyze and mitigate potential risks that may impact processes in smart factories. Each equipment or machinery design presents different risks during maintenance activities, necessitating a clear evaluation model. The benefits of FMEA include its integration into various standards and management systems, such as the ISO/TS 16949 [27] standard for quality management in the automotive and auto parts industry. The ISO 14971 [28] risk management standard has been widely integrated into FMEA across various industries in the era of Industry 4.0. Each industry must consider risk services differently based on its specific production processes. The procedural sequence illustrated in Figure 11 can be applied to enhance smart maintenance planning in industrial facilities [26]. A method is outlined in Figure 11 to calculate the risk priority number (RPN), where the final value is derived from the multiplication of three factors, as expressed in Equation (22).  
Figure 11: Calculation of risk priority number.  
Figure 10: Main steps of FMEA [26].  
In this research, the Risk Priority Number (RPN) was derived from data extracted from the database of a company with which the researchers have signed a cooperation agreement, including obtaining ethical approval for the research from an electrical wire manufacturing company in Thailand. The company involved in the production of automotive parts is generally required to implement Failure Mode and Effects Analysis (FMEA) plans according to ISO14971 standards to assess risks in the production process; therefore, the RPN is automatically linked to our algorithms.