In the context of smart city development, Machine Learning and Deep Learning techniques have gained relevance as tools for real-time decision-making and process automation in pressurized pipeline systems. These technologies are increasingly integrated through Digital Twins to enhance the operational efficiency of urban and industrial hydraulic networks.
One of the key benefits of intelligent tools is their ability to anticipate complex and nonlinear behaviors in hydraulic systems, such as leak detection and localization, energy consumption optimization in pumping stations, and the prediction of transient phenomena associated with entrapped air pockets. The latter has been extensively studied due to its potential to induce damaging overpressures, threatening the structural integrity of the network.
To address this challenge, robust predictive models are essential for integration into real-time monitoring and control systems. In this context, Transformer-based algorithms—originally designed for sequence processing in natural language processing—have shown promise in continuous regression tasks in engineering, especially where complex interactions between multiple variables must be modeled.
This study presents the application of a Transformer Linear Regression model to predict peak pressures during pipe-filling events involving air pockets. The model takes four input variables: (i) pumping pressure (m), (ii) initial upstream air pocket size, (iii) initial downstream air pocket size, and (iv) air valve discharge orifice diameter. Output data is based on the measured peak pressure from the pressure transducer. A total of 83 experimental scenarios were performed. This algorithm was implemented in PyTorch with standardized scaling. The model achieved high predictive accuracy with RMSE = 0.2 and R2 = 0.985, offering an effective tool for exploring operational conditions and estimating peak pressure values in real-time applications.
