# An Unsupervised Anomaly Detection Based on Self-Organizing Map for the Oil and Gas Sector
## 3 The Research Approach  
Figure 2 shows all the steps taken to conduct the research study. The following section describes the two-phase experimental plant used to perform the research work and the neural network used to classify the different working conditions of the plant. The chosen artificial intelligence algorithm is named the Self-Organizing Map. The network's parameters are then explained.  
The steps of the research project are briefly described as follows:  
1. Experimental plant Analysis--An AS-IS analysis is conducted in the two-phase experimental plant. All components and smart sensors it is equipped with are described (Section 3.1).
2. Objective definition--The research project aims to use an artificial neural network to identify potential failures in an oil and gas plant (Section 3.2).
3. Dataset Acquisition Analysis--Numerous tests are conducted on the plant. First, data are taken for the steady state of the system and fault conditions. The anomalies were created intentionally using manual shut-off valves that prevent fluid flow. For each shut-off valve, three distinct degrees of occlusion are produced (L1: low obstruction, L2: medium obstruction, L3: high obstruction) (Section 4.1).
4. Dataset Preprocessing--The readings of steady-state and samples of all anomaly L3 tests are unified into a single database that is then standardized using the z-score method. Finally, the dataset is ready to be fed to the SOM network (Section 4.1).
5. SOM Training--The training process sees the SOM network's optimal choice of two fundamental parameters: Learning Rate and Neighbourhood Size. The two parameters are chosen to minimize an objective function defined by the quantization error (Section 4.2).
6. SOM Output Interpretation--The input data are projected into a two-dimensional output map. Next, the relationships between the areas and macro-areas into which the SOM network projects the different readings are studied. Finally, two parameters are considered to validate the network results: cluster purity and confusion matrix between the predicted and actual readings (Section 4.4).
7. The algorithm in exercise--After training the algorithm and evaluating the results of anomaly L3 tests, the readings of L1 and L2 anomalous states are provided to the SOM algorithm (Section 4.6).
8. Performance evaluation--Sums regarding the algorithm's effectiveness and the outcomes from the two separate datasets are calculated (Section 4.7).  
Figure 2: The research approach.  
The reason for choosing the unsupervised algorithm Self-Organizing Map for the anomaly detection on the experimental two-phase plant is that it generates a two-dimensional map, which can be easily comprehended by operators not well versed in artificial neural networks.  
The Self-Organizing Map algorithm is employed for clustering and visualizing data, creating a map of artificial neurons that efficiently represent data. In contrast to other algorithms, such as Random Forest (RF) [38] and Support Vector Machine (SVM) [39], SOM does not necessitate input data labelling, allowing it to be utilized for analysing unsupervised data. RF and SVM algorithms are primarily used for data classification and regression. These algorithms require input data labelling, meaning that they need training data and a target variable for supervision. Although they can be used to analyse unsupervised data, their effectiveness may be limited. In summary, SOM is useful when working with unlabelled data and seeking to visualize and analyse such data in a compact and organized manner.