## 5 Conclusions  
The objective of constructing a FIS using Python and skFuzzy to detect the stalls in a CT milling operation was accomplished, and the objectives of this work were met. By using the available real-world data, this approach could be validated as the stall events present in this data were successfully flagged by the system as such. Almost all events apart from 1 were detected, leaving a 94% accuracy for the system. The events were also detected as the pressure started to rise; therefore, in a real scenario, the objective of alarming the operator to take action before the stall turns into a permanent damage to the PDM is met.  
Even after discarding more usual ML-based techniques due to restrictions on the available data, the more dated FIS approach, with parameters and rules obtained by the expert only, proved to be a viable option to solve this kind of problem. For more niche problems like the one described in this paper, where no large amounts of data are available, legacy AI techniques are probably the only viable option.  
Due to the relatively small amount of data used for testing, for it to be used as part of a commercial and/or production artificial intelligence system, this algorithm still needs to undergo further testing and improvement with more data from different sources, including the use of PDMs with different specification and different fluids. The use of the flow rate as an input of the system is also recommended, as it can be used to compensate changes in the acquired pressures if the operator changes the pump rate during the job, avoiding false alarms.  
In the future, this system will be used as a base to monitor and supervise other operations involving the coiled tubing unit such as, jetting, inflatable packers, and acid/cement placement. The FIS structure can be maintained and only adjustments to the membership function values and rule database for each kind of operation might be required. Additionally, its ease of use can be improved by automating the definition of the set points for _WHP_, CP, and _CTW_ before starting each use of the PDM, and also by automatically detecting when the PDM is at depth and about to start the job, which would avoid the system of being activated while tripping in or out of hole.  
During this research, no similar work was found during the literature review. This is no guarantee that no similar system is being developed or exists, as such a system could be part of a commercial product by a private company, and thus not be presented in a paper to the scientific community due to commercial needs.  
Conceptualization, R.A.G.F. and P.M.S.R.R.; methodology, R.A.G.F. and P.M.S.R.R.; software, R.A.G.F.; validation, R.A.G.F., P.M.S.R.R., A.N. and J.A.M.; formal analysis, R.A.G.F.; investigation, R.A.G.F.; resources, R.A.G.F.; data curation, R.A.G.F.; writing--original draft preparation, R.A.G.F.; writing--review and editing, J.A.M. and P.M.S.R.R.; visualization, R.A.G.F.; supervision, J.A.M.; project administration, R.A.G.F.; funding acquisition, J.A.M. All authors have read and agreed to the published version of the manuscript.  
This research received no external funding and the APC was funded by Sao Paulo State University under process EDITAL PROPG 43/2022.  
The authors declare no conflict of interest.