# Using Hybrid LSTM Neural Networks to Detect Anomalies in the Fiber Tube Manufacturing Process
## 2 Materials and Methods
### Factory RLM Line Data Acquisition  
As part of the conducted work, the line was equipped with devices that allow for monitoring and recording the tension of individual modules or tight tubes, as well as the temperature of the process water located directly in the cooling baths. Based on the recommendations of tube manufacturing technology experts, 232 measurement points were designated, where the production process was recorded at a frequency of \(1[s]\). This set included both the established process recipe parameters and process variables. The complete data set contained 180 randomly recorded production sessions lasting from 30 min to 150 min, corresponding to different working hours of the line and the teams of operators handling it. An example fragment of measurement data from a single session is presented in Table 2. This includes a small range of approximately a one-hour measurement session in which 20 km of optical cable was produced. Figure 1: The production lines used by FIBRAIN Sp. z o.o. : RLR (**a**), RLV (**b**) oraz RLM (**c**). During the conducted work related to recording measurement data, the team observed random gaps in the process data. These gaps were caused either by improper operator handling of the production line or by malfunctions in individual sensors. Naturally, there are fundamentally different strategies to counteract such issues, ranging from simple methods of discarding damaged data sequences to advanced strategies for repairing them using sophisticated statistical methods, machine learning, or interpolation and extrapolation techniques. Each approach has a specific level of accuracy and computational complexity, which can be crucial when selecting the appropriate method for various industrial applications. For the experiments involving the RLM line, the method of extrapolating missing data (\"gaps\") was adopted, when the size of the gaps did not exceeded 10 s. In cases where the negative effect was more pronounced, the affected data packets were discarded. Considering the strict technological conditions, the occurrence of missing data or abrupt changes in the recorded values was extremely rare. These data were subsequently analyzed using a sliding window with sizes of [64; 128; 256; 512; 1024]. Considering the dynamics of the manufacturing process, it was determined that the most optimal window size, from a technological standpoint and accounting for the possible reaction time of the line operator in the hypothetical event of an anomaly  
\begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline
**Time Stamps** & **BAZ1** & **BAZ2** & **BAZ2** & **BAZ2** & **EXT1** & **EXT1** & **SPE2** & **SPE2** \\
**29 November 2023** & \_iTens** & \_iLoad & \_iMetLo & \_iSpeed & \_iLoad & \_iSpeed & \_iLoad & \_iSpeed \\ \hline
22:17:14 & 0.274658 & 6.427 & 11 & 53.9844 & 33.5266 & 30.957 & 15.4602 & 55.0488 \\
22:17:15 & 0.219727 & 6.38428 & 21 & 53.9844 & 33.783 & 30.957 & 17.218 & 55.0879 \\
22:17:16 & 0.183106 & 6.49414 & 30 & 53.9941 & 33.5205 & 30.9961 & 16.5955 & 54.7461 \\
22:17:17 & 0.146484 & 6.46973 & 39 & 54.043 & 33.5571 & 30.957 & 15.5945 & 54.6094 \\
22:17:18 & 0.164795 & 6.51245 & 48 & 53.9941 & 33.7036 & 30.9473 & 16.9556 & 54.4238 \\
22:17:19 & 0.201416 & 6.5918 & 59 & 54.0234 & 33.7341 & 30.957 & 16.1804 & 54.209 \\
22:17:20 & 0.201416 & 6.5918 & 68 & 54.0234 & 33.5022 & 30.9668 & 16.6687 & 54.209 \\
22:17:21 & 0.274658 & 6.37817 & 77 & 53.9551 & 33.5449 & 30.9668 & 17.4622 & 54.1406 \\
22:17:22 & 0.274658 & 6.50024 & 86 & 53.9844 & 33.8196 & 30.918 & 16.2292 & 54.3359 \\ \(\vdots\) & \(\vdots\) & \(\vdots\) & \(\vdots\) & \(\vdots\) & \(\vdots\) & \(\vdots\) & \(\vdots\) & \(\vdots\) \\
22:25:29 & 0.128174 & 6.79321 & 4644 & 54.9609 & 34.4177 & 31.6602 & 3.62549 & \(-\)0.2929 \\
22:25:30 & 0.366211 & 6.86035 & 4  
presence, would be approximately 4 min, corresponding to a 256-element window.